Skip to content

Instantly share code, notes, and snippets.

@macmladen
Last active August 29, 2015 14:07
Show Gist options
  • Save macmladen/8d020c2cc27296eebb07 to your computer and use it in GitHub Desktop.
Save macmladen/8d020c2cc27296eebb07 to your computer and use it in GitHub Desktop.
// Find events on element http://stackoverflow.com/a/2519061/1099667
// initially with alert() but changed to console.log()
// jQuery 1.8+
$.each($("#element").data("events"), function(i, e) {
alert(i);
});
//jQuery 1.4+
$.each($("#element").data("events"), function(i, event) {
console.log(i);
$.each(event, function(j, h) {
console.log(h.handler);
});
});
// Address DOM element
document.getElementById('myElement-Id-name');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment