X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=13983fb016ef700f0e43e8b9b4e3f58a89c0b2fb;hb=fd2a2fed84b6c32e24a050356a8f422310bae927;hp=c537c7095b55339deb389418ec32f41cccd9bef3;hpb=f8ef75eb9124ce924be5fb521c783efd5c996e33;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index c537c70..13983fb 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -186,8 +186,7 @@ jQuery.each({ remove: function( selector ) { if ( !selector || jQuery.multiFilter( selector, [ this ] ).length ) { if ( this.nodeType === 1 ) { - cleanData( this.getElementsByTagName("*") ); - cleanData( [this] ); + cleanData( jQuery("*", this).add(this) ); } if ( this.parentNode ) { @@ -199,7 +198,7 @@ jQuery.each({ empty: function() { // Remove element nodes and prevent memory leaks if ( this.nodeType === 1 ) { - cleanData( this.getElementsByTagName("*") ); + cleanData( jQuery("*", this) ); } // Remove any remaining nodes