Skip to content

Instantly share code, notes, and snippets.

@beatrizsmerino
Last active April 2, 2020 15:00
Show Gist options
  • Save beatrizsmerino/b3905e7bf30f214dc5e068389938dd78 to your computer and use it in GitHub Desktop.
Save beatrizsmerino/b3905e7bf30f214dc5e068389938dd78 to your computer and use it in GitHub Desktop.
Check element on click
window.addEventListener("click", function (e) {
e.preventDefault();
console.dir(e.target);
});
$(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