diff options
author | Robert Katic <robert.katic@gmail.com> | 2010-03-14 12:34:32 +0100 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-09-23 12:07:42 -0400 |
commit | da5706c974f8ef720b3194179366e1096c19269e (patch) | |
tree | 92937f3a821f243229febb35833a882ea3b42246 /src/event.js | |
parent | 97b42492bb391bab346d265b70dc62e9d90ecd3d (diff) | |
download | jquery-da5706c974f8ef720b3194179366e1096c19269e.tar.gz jquery-da5706c974f8ef720b3194179366e1096c19269e.zip |
Added support for map of events in live, die, delegate and undelegate. Fixes #6282.
Diffstat (limited to 'src/event.js')
-rw-r--r-- | src/event.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/event.js b/src/event.js index 264ac5b1b..e667ddbdc 100644 --- a/src/event.js +++ b/src/event.js @@ -944,6 +944,14 @@ jQuery.each(["live", "die"], function( i, name ) { var type, i = 0, match, namespaces, preType, selector = origSelector || this.selector, context = origSelector ? this : jQuery( this.context ); + + if ( typeof types === "object" && !types.preventDefault ) { + for ( var key in types ) { + context[ name ]( key, data, types[key], selector ); + } + + return this; + } if ( jQuery.isFunction( data ) ) { fn = data; |