I have a problem with my cloned element. My code looks like this:
var clone = $('#clone').clone()
$('.addprop').live('click', function() {
$(clone).clone().addClass('add-margin').removeAttr('id').insertAfter(".addprop");
})
It works fine, it doesn’t add the id, but now I need to add different name for every cloned element. Can anyone help?
Is this what you want?
Demo