Easy Tutorial
❮ Sel Multiple Elements Sel Gt ❯

jQuery undelegate() Method

jQuery Event Methods

Example

Remove all event handlers from all elements using the undelegate() method:

$("body").undelegate();

Definition and Usage

The undelegate() method removes one or more event handlers that were added with the delegate() method.

Since jQuery version 1.7, the on() and off() methods are the preferred ways to add and remove event handlers on elements.


Syntax

Parameter Description
selector Optional. Specifies the selector from which the event handler needs to be removed.
event Optional. Specifies one or more event types for which the handler function needs to be removed.
function Optional. Specifies the specific event handler function to be removed.

More Examples

Remove all click event handlers

Remove a specific function added by delegate()


jQuery Event Methods

❮ Sel Multiple Elements Sel Gt ❯