fix for #4189, live/die now work with contexts other than just document
This commit is contained in:
parent
dae96f552e
commit
30e760b63f
2 changed files with 21 additions and 3 deletions
|
@ -548,13 +548,13 @@ jQuery.fn.extend({
|
|||
var proxy = jQuery.event.proxy( fn );
|
||||
proxy.guid += this.selector + type;
|
||||
|
||||
jQuery(document).bind( liveConvert(type, this.selector), this.selector, proxy );
|
||||
jQuery( this.context ).bind( liveConvert(type, this.selector), this.selector, proxy );
|
||||
|
||||
return this;
|
||||
},
|
||||
|
||||
die: function( type, fn ){
|
||||
jQuery(document).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
|
||||
jQuery( this.context ).unbind( liveConvert(type, this.selector), fn ? { guid: fn.guid + this.selector + type } : null );
|
||||
return this;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue