This is my script:
$(\'.addprop\').click(function() {
$(\'#clone\').clone().insertAfter(\'.addprop\');
})
I need to add a class to
Sure.
After the .clone()
method the current element is the clone..
$('#clone').clone().addClass('class-name-here').insertAfter('.addprop');
Notice
you will need to change the id
of the clone as it must be unique in the DOM and when you clone that element, the id is cloned as well..
So better to do something like
$('#clone').clone().attr('id','newid').addClass('class-name-here').insertAfter('.addprop');