π» Real-world scenario:
- When we throw a stone in the river, have you observed there?
- It pushes the water out of the way, making a ripple that moves away from where the stone landed.
Right?
- When we throw a stone in the river, have you observed there?
- It pushes the water out of the way, making a ripple that moves away from where the stone landed.
Right?
π» What is bubbling in JS?
- Similarly in JavaScript, When an event happens on an element, it first runs the handlers function on it, and then it grows like water ripples till the "document" object in JavaScript.
- Similarly in JavaScript, When an event happens on an element, it first runs the handlers function on it, and then it grows like water ripples till the "document" object in JavaScript.
- This type of process is called "bubbling" in JavaScript because the events bubble(ripple) from the inner element to the parent element.
Just like a water ripple:)
Try it from here:
codepen.io
Just like a water ripple:)
Try it from here:
codepen.io
That's all for now, we will meet in the next threadπ
π Follow Me @ATechAjay
For:
π Web Development
β¨ JavaScript
βοΈ React JS
π Writing Skill
π₯ Motivation
πΉ Growth
β But Not For Only Resources & Shitpost π
Thank you so much for staying to the end of this threadπ
π Follow Me @ATechAjay
For:
π Web Development
β¨ JavaScript
βοΈ React JS
π Writing Skill
π₯ Motivation
πΉ Growth
β But Not For Only Resources & Shitpost π
Thank you so much for staying to the end of this threadπ
Loading suggestions...