How To: jQuery - Get Event Handlers For An Element

Prior to jQuery 1.8, the event related data was stored in a data object named events and was available with the following syntax: $("selector").data("events"). It was removed from jQuery starting with version 1.8 in an effort to build a "slimmer" jQuery. However, the event related data is still available in an undocumented method named jQuery._data.


$._data(element, "events");


var eventData = $._data($("#okButton")[0], "events");
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License