Skip to content

Instantly share code, notes, and snippets.

@ls-lukebowerman
Created May 27, 2011 19:03
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 ls-lukebowerman/995922 to your computer and use it in GitHub Desktop.
Save ls-lukebowerman/995922 to your computer and use it in GitHub Desktop.
Nice trick to get list of JS events currently attached (good for auditing keyup/down)
// Requires jQuery
// KeyUP
$($(document).data("events").keyup).each(function(e){ console.log(this.data); });
// KeyDOWN (MOS default)
$($(document).data("events").keydown).each(function(e){ console.log(this.data); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment