Skip to content

Instantly share code, notes, and snippets.

@Ivlyth
Last active May 26, 2022 09:44
Show Gist options
  • Save Ivlyth/63e6ffdc0288f40a7f75eace378176cf to your computer and use it in GitHub Desktop.
Save Ivlyth/63e6ffdc0288f40a7f75eace378176cf to your computer and use it in GitHub Desktop.
find clickable element in page
// https://stackoverflow.com/questions/9238119/find-clickable-elements
$.each($('.container').find("*").andSelf().data("events"), function(i, event) {
$.each(event, function(j, h) {
if(j === 'click')
{
//Do stuff to $(this)
alert(j);
alert(h.handler); //Gets the actual handler for each event ( inject code >=] )
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment