Skip to content

Instantly share code, notes, and snippets.

@travist
Created February 29, 2012 17:12
Show Gist options
  • Save travist/1942541 to your computer and use it in GitHub Desktop.
Save travist/1942541 to your computer and use it in GitHub Desktop.
Determine every event that gets fired on your page.
(function($) {
$('*').each(function() {
var e = $.data(this, 'events');
if(!e) return;
for(var p in e) {
$(this).bind(p, {event:p, name: this.tagName + '.' + this.className}, function(event) {
console.log(event.data.name + " triggered " + event.data.event);
});
};
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment