git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make it so that you can pass in event data to .click(), et. al. Fixes #6187.
[jquery.git]
/
src
/
event.js
diff --git
a/src/event.js
b/src/event.js
index
bfe2dd1
..
779c069
100644
(file)
--- a/
src/event.js
+++ b/
src/event.js
@@
-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
"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 ) {
};
if ( jQuery.attrFn ) {