Make it so that you can pass in event data to .click(), et. al. Fixes #6187.
This commit is contained in:
parent
9e06903a99
commit
ba7195e3f9
2 changed files with 15 additions and 2 deletions
|
@ -1071,8 +1071,10 @@ jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblcl
|
|||
"change select submit keydown keypress keyup error").split(" "), function( i, name ) {
|
||||
|
||||
// Handle event binding
|
||||
jQuery.fn[ name ] = function( fn ) {
|
||||
return fn ? this.bind( name, fn ) : this.trigger( name );
|
||||
jQuery.fn[ name ] = function( data, fn ) {
|
||||
return data || fn ?
|
||||
this.bind( name, fn ? data : null, fn || data ) :
|
||||
this.trigger( name );
|
||||
};
|
||||
|
||||
if ( jQuery.attrFn ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue