diff options
author | John Resig <jeresig@gmail.com> | 2009-12-09 13:28:58 -0800 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2009-12-09 13:28:58 -0800 |
commit | 4b70f006f579fba24a882d80ca67f1971dbb4922 (patch) | |
tree | f3bb24c52928b8bbdaf19eff5ec713a434064d18 /src | |
parent | f6a0bf6816f4e2e67382b1b13fdd3ff2ea4b22f8 (diff) | |
download | jquery-4b70f006f579fba24a882d80ca67f1971dbb4922.tar.gz jquery-4b70f006f579fba24a882d80ca67f1971dbb4922.zip |
Made .clone(true) also copy over element data. Fixes #4191.
Diffstat (limited to 'src')
-rw-r--r-- | src/manipulation.js | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/manipulation.js b/src/manipulation.js index 0c2753e96..930b3d9b9 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -277,13 +277,7 @@ function cloneCopyEvent(orig, ret) { return; } - var events = jQuery.data( orig[i], "events" ); - - for ( var type in events ) { - for ( var handler in events[ type ] ) { - jQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data ); - } - } + jQuery.data( this, jQuery.data( orig[i++] ) ); }); } |