I need to go really global for some debugging of event handlers I'm looking at this other stack overflow question which is great except that I want to go universal with this
// Log ALL handlers for ALL events:
jQuery.each($('#elem').data('events'), function(i, event){
jQuery.each(event, function(i, handler){
console.log( handler['handler'].toString() );
});
});
Is there a jQuery identifier for ALL jQuery objects? I would have expected $(obj)
or $('*')
but neither does the trick (that or I have another issue).
Note: the bound event that I'm trying to debug I suspect to be bound via jQuery's .on()
method at either body
or window
.
Additional note: is it because I'm binding with .on()
and it doesn't register events to the $(document).data('events')
object?