Reputation: 10271
How can I detect which javascript event handlers are currently active for the document? Or a particular element?
Upvotes: 1
Views: 2058
Reputation: 8767
Using jQuery:
var ele = $("#web"); // Replace with specified element
ele.click(function(){});
ele.mouseover(function(){});
$.each(ele.data("events"), function(i, e) {
alert(i);
});
Working example: http://jsfiddle.net/7HEuW/
Upvotes: 1