]> source.dussan.org Git - jquery.git/commitdiff
Simplify the special change/submit event removal logic, per Scott's suggestion in...
authorjeresig <jeresig@gmail.com>
Wed, 10 Feb 2010 20:56:53 +0000 (15:56 -0500)
committerjeresig <jeresig@gmail.com>
Wed, 10 Feb 2010 20:56:53 +0000 (15:56 -0500)
src/event.js

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