Skip to content

Instantly share code, notes, and snippets.

@melvinstanly
Created July 26, 2021 14:52
Show Gist options
  • Save melvinstanly/df4e008902a20f086578694a207303c6 to your computer and use it in GitHub Desktop.
Save melvinstanly/df4e008902a20f086578694a207303c6 to your computer and use it in GitHub Desktop.
Check the event target is a particular html element
<script>
if(event.target.tagName.toLowerCase() === 'div'){
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment