DEV Community

Introduction to JavaScript Event Handlers

John Au-Yeung on January 03, 2020

Subscribe to my email list now at http://jauyeung.net/subscribe/ Follow me on Twitter at https://twitter.com/AuMayeung Many more articles at http...
Collapse
 
drmaquino profile image
Mariano Aquino • Edited

Is there any priority or rule to know whether a click on a DOM element will trigger the most inner children or the most outer grandparent? And another question, how would you handle the case where you want only a specific element to handle a particular event? For instance, the parent, but not the child nor the grandparent.
Thanks!!

Collapse
 
aumayeung profile image
John Au-Yeung

Bubbling will go from child to parent and capturing is the other way around.

Collapse
 
milburngomes profile image
MilburnGomes

Great article, very clear and to the point - easy to understand. Thanks for sharing.

Collapse
 
aumayeung profile image
John Au-Yeung

Thanks so much for reading!