]> source.dussan.org Git - jquery.git/commitdiff
Allow function to be passed in as a data object to bind and one. Fixes #6993.
authorJohn Resig <jeresig@gmail.com>
Sun, 17 Apr 2011 00:37:35 +0000 (17:37 -0700)
committerJohn Resig <jeresig@gmail.com>
Sun, 17 Apr 2011 00:37:35 +0000 (17:37 -0700)
src/event.js

index bfd26307889c02a4d6a0fa74acdd12a0c19081db..ee3606fe4c4a3644cd8691135ffbc26bbf61a270 100644 (file)
@@ -909,7 +909,7 @@ jQuery.each(["bind", "one"], function( i, name ) {
                        return this;
                }
 
-               if ( jQuery.isFunction( data ) || data === false ) {
+               if ( arguments.length === 2 || data === false ) {
                        fn = data;
                        data = undefined;
                }