Added support for map of events in live, die, delegate and undelegate. Fixes #6282.
This commit is contained in:
parent
97b42492bb
commit
da5706c974
2 changed files with 47 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue