HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
jQuery Event Methods : Remove all event handlers for all <p> elements
The unbind() method was deprecated in version 3.0. Use the off() method instead.
The unbind() method removes event handlers from selected elements.
This method can remove all or selected event handlers, or stop specified functions from running when the event occurs.
This method can also unbind event handlers using an event object. This is used to unbind an event from within itself (like removing an event handler after the event has been triggered a certain number of times).
Parameter | Description |
---|---|
event | Optional. Specifies one or more events to remove from the elements. Multiple event values are separated by space. If this is the only parameter specified, all functions bound to the specified event will be removed. |
function | Optional. Specifies the name of the function to unbind from the specified event for the element |
eventObj | Optional. Specifies the event object to remove to use. The
eventObj parameter comes from the event binding function |