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 the click event for all <p> elements
The off() method is most often used to remove event handlers attached with the on() method.
As of jQuery version 1.7, the off() method is the new replacement for the unbind(), die() and undelegate() methods. This method brings a lot of consistency to the API, and we recommend that you use this method, as it simplifies the jQuery code base.
Parameter | Description |
---|---|
event | Required. Specifies one or more events or namespaces to remove from the selected element(s). Multiple event values are separated by a space. Must be a valid event |
selector | Optional. A selector which should match the one originally passed to the on() method when attaching event handlers |
function(eventObj) | Optional. Specifies the function to run when the event occurs |
map | Specifies an event map ({event:function, event:function, ...}) containing one or more event to attach to the elements, and functions to run when the events occur |