Skip to content
Permalink
Browse files

fix remove and empty to work properly in IE when an element with the …

…id of length exists. fixes ajax event hanlders in test suite from firing multiple times because they did not get cleaned up.
  • Loading branch information
brandonaaron committed May 16, 2009
1 parent a4a58a3 commit 4a99fcf6e4b152706b951df584614da32b08f6e4
Showing with 2 additions and 3 deletions.
  1. +2 −3 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

0 comments on commit 4a99fcf

Please sign in to comment.
You can’t perform that action at this time.