For details about how to determine whether an event is bound, refer.
Research has found that jquery caches events to prevent memory overflow and the speed of page unload. It also includes multiple function triggers and convenient management, for details, refer to this article. Jquery will unmount all bound events during window. Unload to release the memory.
Use the following statement to determine whether an event has been bound to an element:
Jquery. Data (ELEM, "events") [type] // the old version can also be used later than $ (ELEM). Data ("events") [type] // 1.2.3.
Return Value:
An object can be traversed using for in. Or undefined.
Parameters:
ELEM is a DOM object and type is an event type.
Example:
Determine whether a click event is bound to an element with the ID of FOO:
If ($ ("# foo"). Data ("events") ["click"]) {// your code}