0

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?

Community
  • 1
  • 1
Brian
  • 3,920
  • 12
  • 55
  • 100

1 Answers1

0

In my case, events / bindings were being suppressed by another jQuery plugin using the event.stopPropagation method.

Brian
  • 3,920
  • 12
  • 55
  • 100