Allow function to be passed in as a data object to bind and one. Fixes #6993.

This commit is contained in:
John Resig 2011-04-16 17:37:35 -07:00
parent 94ee3e9743
commit 6e3b596514

View 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;
}