X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=841447fa2efcd801daca97eb4762d851f939e04e;hb=d77a2a2274d34033da8609a26c9cc1f2bd14c879;hp=442a14d2990dc978c8374232050988cb6dc2a4db;hpb=0a0cff9d29c4bd559da689d96c532d06c03fce09;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index 442a14d..841447f 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -7,7 +7,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, rtbody = /", "" ], @@ -184,7 +184,7 @@ jQuery.fn.extend({ }, clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? true : dataAndEvents; + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; return this.map( function () { @@ -503,6 +503,8 @@ jQuery.extend({ // proprietary methods to clear the events. Thanks to MooTools // guys for this hotness. + cloneFixAttributes( elem, clone ); + // Using Sizzle here is crazy slow, so we use getElementsByTagName // instead srcElements = elem.getElementsByTagName("*"); @@ -514,8 +516,6 @@ jQuery.extend({ for ( i = 0; srcElements[i]; ++i ) { cloneFixAttributes( srcElements[i], destElements[i] ); } - - cloneFixAttributes( elem, clone ); } // Copy the events from the original to the clone