Reputation: 80
I'm working on a script but it doesn't seems to work. The idea is to copy a DIV and it's jQuery functions, it just stop functioning.
What am I doing wrong?
Upvotes: 1
Views: 59
Reputation: 23
You are using the blank .clone() function. You should rather use .clone([withDataAndEvents])
jQuery('#Certificaat').clone(true)... // the "true" argument does the job for you.
Upvotes: 0
Reputation: 1772
Call it as jQuery('#Certificaat').clone(true).appendTo('#CertificaatNieuw');
Optional parameter in clone() set to true allows to copy with data and events.
Upvotes: 2