stopPropogation() vs preventDefault() in JavaScript

In the previous blog post, we looked at what event bubbling is and how we can implement it.

In this article we’ll see what is the difference between stopPropogation() and preventDefault() methods in an event handler.

event bubbling

Event bubbling concept is a way of propagating the events from the element clicked all the way to the ancestor. This is a beginner article so if you are already aware of this you can skip this article.

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×