Simplify the special change/submit event removal logic, per Scott's suggestion in 5267824aa3.

This commit is contained in:
jeresig 2010-02-10 15:56:53 -05:00
parent 5267824aa3
commit 35c379075c

View file

@ -677,8 +677,7 @@ if ( !jQuery.support.submitBubbles ) {
}, },
teardown: function( namespaces ) { teardown: function( namespaces ) {
jQuery.event.remove( this, "click.specialSubmit" ); jQuery.event.remove( this, ".specialSubmit" );
jQuery.event.remove( this, "keypress.specialSubmit" );
} }
}; };
@ -778,9 +777,7 @@ if ( !jQuery.support.changeBubbles ) {
}, },
teardown: function( namespaces ) { teardown: function( namespaces ) {
for ( var type in changeFilters ) { jQuery.event.remove( this, ".specialChange" );
jQuery.event.remove( this, type + ".specialChange", changeFilters[type] );
}
return formElems.test( this.nodeName ); return formElems.test( this.nodeName );
} }