In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces jquery how to remove the click event, the article is very detailed, has a certain reference value, interested friends must read it!
Jquery remove the click event method: 1, use the "$(specified element)" statement to get the specified element object that has been bound to the click click event; 2, use the unbind () method to delete the click click event of the specified element object, the syntax is "element object .unbind ();".
The operating environment of this tutorial: windows10 system, jquery3.2.1 version, Dell G3 computer.
In jquery, you can use the unbind () method to remove the click event.
The unbind () method removes the event handler for the selected element. This method can remove all or selected event handlers, or terminate the operation of the specified function when the event occurs. Ubind () applies to any event handler attached through jQuery.
Let's take a look at how to remove the click event of an element through an example, as follows:
$(document) .ready (function () {$("p") .click (function () {$(this). SlideToggle ();}); $("button") .click (function () {$("p"). Unbind ();})
This is a paragraph.
This is another paragraph.
Click on any paragraph to make it disappear. Including this paragraph.
Delete the click event of the p element
Output result:
The above is all the content of the article "how to remove the click event from jquery". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.