Last active
May 26, 2022 09:44
-
-
Save Ivlyth/63e6ffdc0288f40a7f75eace378176cf to your computer and use it in GitHub Desktop.
find clickable element in page
This file contains hidden or 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
// 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