Cloning Whole Form Elements After Clicking Button October 23, 2023 Post a Comment I have this following form &Solution 1: I think you need to duplicate the contents of (row-fluid), not the whole (Wrapper) contents, this should let you add more rows of your original form template when clicking on AddMore link.This is an edit to the suggested solution by @user2389688:$("#addMore").click(function(){ $(".row-fluid:last").clone().appendTo(".wrapper"); }); CopyJsFiddle Link: http://jsfiddle.net/tCY8v/1/ Solution 2: Something like this ?$("#addMore").click(function(){ var contents = $("form").html(); $("#wrapper").append(contents); }); Copyhttp://jsfiddle.net/tCY8v/Baca JugaHow To Convert An Html String To A Pdf Inputstream?Safari 6 (ios 6) Flex Layout Doesn't Wrap ElementsChecking Image Size Using Jquery Validation Not WorkingIf I did understand your question correctly.Solution 3: For example: $('#addMore').click(function() { $('.row-fluid').eq(0).clone().insertBefore(this); }); Copy Share You may like these postsBs4 Breaks Html Trying To Repair ItHow To Sort Value Inside A Firebase Child To The Rest?Disable Scrollbar Globally, But Enable On Specific ElementHtml Page Is Displayed Well As File, But Not On Server Post a Comment for "Cloning Whole Form Elements After Clicking Button"