Normally Clone (Copy) with selected value does not work in Jquery. so you can use the code below the code.
1 2 3 4 5 6 7 8 9 10 11 12 |
var clone=$(‘#fromID').clone(); var selects = $('#fromID').find("select"); $(selects).each(function(i) { var select = this; $(clone).find("select").eq(i).val($(select).val()); }); $(“#toID").append(clone); |
More Stories
Convert Unix Time to other Time Zone in Java script
html5 capture image from camera
How to redirect to application(iOS or Android) from javascript