How to obtain events on an element. jquery's events bound to the element can be retrieved using the data method. The following is an example, you can refer to jquery's events bound to elements and obtain them using the data method.
Use $ (element). data ("events") to obtain
// For example, bind two click events to a button $ ("button "). click (function () {alert ("1")}); $ ("button "). click (function () {alert ("2 ")}); // click this button at this time, and the alert boxes of 2 and 1 will pop up respectively. // retrieve all the click events of the button, which is an array.
$("button").data('events').click
The array of two click events is displayed.
To get the array, you can adjust the order and then set it back.
$("button").data('events').click = newEventArray;
The following is the test page for this method:
<% @ Page contentType = "text/html; charset = UTF-8" language = "java" %>
Test jquery dynamic change events