Languages
[Edit]
EN

jQuery - remove event

11 points
Created by:
DEX7RA
580

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

Quick solutions

Edit

1. Dedicated approaches:

Edit
  1. jQuery - how to remove event with off method? - introduced in jQuery 1.7
  2. jQuery - how to remove event with unbind method? - deprecated since jQuerry 3.0

2. Removing handler with removeAttr method examples

Edit

This approach is useful when an event has been added as an element attribute (e.g. onclick).

2.1. When the event has been added in HTML

Edit

2.2. When the event has been added in JavaScript

Edit

3. Removing handler with prop method example

Edit

This approach is useful when an event has been added as an element property (e.g. onclick).

Alternative titles

  1. jQuery - how to remove event?
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