mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
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.
This commit is contained in:
parent
a4a58a3836
commit
4a99fcf6e4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user