Commit 4a99fcf6 authored by Brandon Aaron's avatar Brandon Aaron

fix remove and empty to work properly in IE when an element with the id of...

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.
parent a4a58a38
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment