Yapapaya / jquery-cloneya

A jquery plugin to clone DOM elements
MIT License
76 stars 28 forks source link

Child data is always cloned - deepClone and dataClone options are ignored #39

Closed acoulton closed 9 years ago

acoulton commented 9 years ago

It seems like the .data() on child elements is always cloned, irrespective of the setting of the deepClone and dataClone options. This causes obvious issues with jquery plugins initialised on elements inside the cloned group.

It looks like this is because the options are passed to jquery.clone() as a hash - but that method expects two booleans and treats the hash as equivalent to true.

I will submit a fix and test in a PR just now.