Last active
July 4, 2016 07:07
-
-
Save danielt69/650672958286e0345d4fe7f97bced8fd to your computer and use it in GitHub Desktop.
From http://stackoverflow.com/questions/7439570/how-do-you-log-all-events-fired-by-an-element-in-jquery
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
monitorEvents(document.body); // logs all events on the body | |
monitorEvents(document.body, 'mouse'); // logs mouse events on the body | |
monitorEvents(document.body.querySelectorAll('input')); // logs all events on inputs | |
$('a').on("click mousedown mouseup focus blur keydown change mouseup click dblclick mousemove mouseover mouseout mousewheel keydown keyup keypress textInput touchstart touchmove touchend touchcancel resize scroll zoom focus blur select change submit reset",function(e){ | |
console.log(e); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment