Web devlopers When to use stopPropagation and preventDefault in Javascript?

preview_player
Показать описание
Get Unlimited Access to Over 20+ courses that will give you the edge you need to get a job as a developer as soon as possible.
Use this link to get 50% Off Coupon Code "FROMYOUTUBE"

IF YOU PREFER TO OWN THE COURSES ON UDEMY USE THIS LINK WILL GIVE YOU A DISCOUNT TO ALL UDEMY COURSES INCLUDING MINES

People always ask me what courses I took to become a successful web developer here are all the links to them. I GUARANTEE THEY WORK!!!!

Ultimate MYSQL Course

Web Developer Bootcamp

JavaScript: Understanding the Weird Parts

ES6 Javascript

Learn React

Angular 4 the complete guide

Please subscribe and give a thumbs up!
New tutorials everyday just for you guys.
Also visit
where you can find all the files for this tutorial
Рекомендации по теме
Комментарии
Автор

Very clear. Thanks. Had read about these 2 things multiple times over the years but could never really wrap my head around them. Now I can.

gaatutube
Автор

5 years on and I found this very very useful, thanks g

collinsejindu
Автор

Thanks, I understand this finally, after almost 2 years doing software development. You should have written Mozilla documentation.

wilcas
Автор

Damn I feel dumb as hell cuz I ain't even got to this in JavaScript yet lol. I'll save it to my bookmark for when I do get to it. Appreciate it my g

raycash
Автор

Thanks a million. the best explanation!!!

kirhab
Автор

why do you put a link if you dont want any action on it ??, why we use exactly PREVENT DEFAULT()?, can explain me ??

lbrevilation
Автор

But... how to deal in case if i have onclick action on parent (red box) element and i need to access exactly parents event.target, but user click on link area (he can do it). Think of some fancy tab, button or some card with icons, texts etc. event.target will return the element user was clicked and it not always will be parent (where onclick actually was attached).

Oswee
Автор

now what is stopImmidiatelPropagation() ?

martipk
Автор

Does anybody else ever get "TypeError: Cannot read property 'preventDefault' of undefined". i've NEVER gotten preventDefault to work. It always does this reaguardless of what I'm doing with it.

jjsmithlago
Автор

How long does it take u to recreate the new instagram layout from scratch ?

rayane
Автор

the sign up button on the site does not work fyi

VoyceAtlas
Автор

This didn't tell me WHEN to use it. Only how it works.

MrPDTaylor
Автор

I am not confident I can learn programming at all

simbobcrafts
Автор

When I heard you talking I immediately wanted to give you a downvote. But the content is actually good. Understandable and not too long also. Well done. You just happen to have the speaking habitus of someone living on the street ;-)

wassollderscheiss