Created
February 29, 2012 17:12
-
-
Save travist/1942541 to your computer and use it in GitHub Desktop.
Determine every event that gets fired on your page.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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