Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@vitkon
Last active December 17, 2015 21:18
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vitkon/5673266 to your computer and use it in GitHub Desktop.
Save vitkon/5673266 to your computer and use it in GitHub Desktop.
JS: Simple event logger (for debugging)
function initLogger () {
for(var eventName in $.event.global) {
$("*").bind(eventName, function(event) {
console.log(
event.type+": "+
event.target.nodeName+") "+
Array.prototype.slice.call(arguments, 1).join(", "));
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment