Last active
April 2, 2020 15:00
-
-
Save beatrizsmerino/b3905e7bf30f214dc5e068389938dd78 to your computer and use it in GitHub Desktop.
Check element on click
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
window.addEventListener("click", function (e) { | |
e.preventDefault(); | |
console.dir(e.target); | |
}); |
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
$(window).on("click", function (e) { | |
e.preventDefault(); | |
console.dir(e.target); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment