Disgeae
Disgeae

Reputation: 80

Copying DIV with working functionality

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.

http://tinyurl.com/cr5uft9

What am I doing wrong?

Upvotes: 1

Views: 59

Answers (2)

hoelle2011
hoelle2011

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

pepper
pepper

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

Related Questions