View events bound to an element

Snippet

View events bound to an element in jquery.

// List bound events:
console.dir( jQuery('#elem').data('events') );
 
// Log ALL handlers for ALL events:
jQuery.each($('#elem').data('events'), function(i, event){
    jQuery.each(event, function(i, handler){
        console.log( handler.toString() );
    });
});

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.