mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 06:04:58 -05:00
Added support for map of events in live, die, delegate and undelegate. Fixes #6282.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user