jQuery die() method
Example
Remove all event handlers added by the live() method to the
element:
$("p").die();
Try it »
Definition and Usage
The die() method wasdeprecatedin jQuery version 1.7, and removed in version 1.9. Please use the off() method instead.
The die() method removes one or more event handlers added by the live() method to the selected elements.
Syntax
$(
selector
).die(
event,function
)
| Parameters | Description |
|---|---|
| event | Required. Specifies one or more event handlers to remove. |
由空格分隔多个事件值。必须是有效的事件。 |
| function | Optional. Specifies the specific function to remove. |
More examples
Remove a specified event handler
How to use the die() method to remove only a specified event handler from the selected element.
jQuery event methods