X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=0c2753e968200c98c7b983ebfaf58f649740ded9;hb=f6a0bf6816f4e2e67382b1b13fdd3ff2ea4b22f8;hp=a8cb484bbd8e667e338d47fc37c5a45dd36931c3;hpb=3f7fc25494988ee5be66c0af0d552b24f0ca1b79;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index a8cb484..0c2753e 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -48,7 +48,7 @@ jQuery.fn.extend({ if ( this[0] ) { // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(); + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); if ( this[0].parentNode ) { wrap.insertBefore( this[0] ); @@ -463,7 +463,7 @@ jQuery.extend({ function cleanData( elems ) { for ( var i = 0, elem, id; (elem = elems[i]) != null; i++ ) { - if ( (id = elem[expando]) ) { + if ( !jQuery.noData[elem.nodeName.toLowerCase()] && (id = elem[expando]) ) { delete jQuery.cache[ id ]; } }