Languages
[Edit]
EN

jQuery - remove event with off method

5 points
Created by:
Root-ssh
178170

In this article, we would like to show you how to remove events with off method using jQuery.

Note: off method has been introduced in jQuery 1.7.

Quick solutions

Edit

1. Removing all events from element example

Edit

2. Removing all handlers for one event examples

Edit

2.1. Example 1 - directly from the element

Edit

2.2. Example 2 - children filtered by a selector

Edit

3. Removing specific handler for one event examples

Edit

3.1. Example 1 - directly from the element

Edit

3.2. Example 2 - children filtered by selector 

Edit

4. Removing a few events example

Edit

4.1. Example 1 - directly from the element

Edit

4.2. Example 2 - children filtered by a selector 

Edit

Merged questions

Edit
  1. jQuery - how to remove listener in element?
  2. jQuery - how to remove all listeners in element?

Alternative titles

  1. jQuery - how to remove event with off method?
1
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

jQuery

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join