Learn JavaScript Event Listeners In 18 Minutes

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 1. 06. 2024
  • 🚹 IMPORTANT:
    JavaScript Simplified Course: javascriptsimplified.com
    JavaScript events are one of the most important topics for you to learn. In this video I will dive into everything you need to know about JavaScript events to make sure you completely understand how they work.
    📚 Materials/References:
    Arrow Functions Video: ‱ JavaScript ES6 Arrow F...
    Event Listener Article: blog.webdevsimplified.com/202...
    🧠 Concepts Covered:
    - addEventListener
    - Capture phase
    - Bubble phase
    - removeEventListener
    - Event delegation
    🌎 Find Me Here:
    My Blog: blog.webdevsimplified.com
    My Courses: courses.webdevsimplified.com
    Patreon: / webdevsimplified
    Twitter: / devsimplified
    Discord: / discord
    GitHub: github.com/WebDevSimplified
    CodePen: codepen.io/WebDevSimplified
    ⏱ Timestamps:
    00:00 - Introduction
    00:56 - addEventListener Basics
    03:52 - Event Bubbling/Capturing
    09:12 - Stopping Event Propagation
    10:45 - Run Event Only Once
    11:19 - removeEventListener
    13:17 - Event Delegation
    17:48 - Outro
    #EventListener #WDS #JavaScript

Komentáƙe • 559

  • @samuelamare3080
    @samuelamare3080 Pƙed 3 lety +486

    I don't know what's more perfect, this guy's tutorials or his hair!

  • @ShinAkuma
    @ShinAkuma Pƙed 3 lety +472

    This is the hands down the best tutorial I've ever seen on event listeners.

    • @bk._550
      @bk._550 Pƙed 3 lety +1

      ok

    • @Ali-mc4le
      @Ali-mc4le Pƙed 3 lety +1

      www.udemy.com/course/coding-interview-crash-course-for-web-developer-2020/?couponCode=ADA6B72288D49A1CAE25

    • @AndrewTSq
      @AndrewTSq Pƙed 3 lety +5

      This is the hands down the best comment I've ever seen on videos on event listeners. :-) No he is a good guy who do great videos.

    • @silentxcure
      @silentxcure Pƙed 3 lety +4

      @@AndrewTSq This is the hands down the best response to a comment I've ever seen on videos on event listeners.

    • @_shuu9472
      @_shuu9472 Pƙed 3 lety +4

      To me he's the best tutor i've ever found on the internet

  • @Wesley-Insley-Comedy
    @Wesley-Insley-Comedy Pƙed 3 lety +150

    WDS is so nice. no "WHATS UP GUYS AND TODAAY WE ARE LEARNINGGG" - nope. Just a nice, calm, easy to listen to voice and concise and succinct explanations. six months ago I didn't know the difference between the different css selectors and now I am comfortable with react & have started working with firebase. MOST of that came knowledge came from this channel. Couldn't be more grateful. Thanks dude!

  • @oortcloud210
    @oortcloud210 Pƙed 10 měsĂ­ci +10

    Been coding in JS for 25 years and didn't know about doing a matches call on an event object.
    It's why I look at videos like this now and then. To refresh and also because you are always learning something new!

  • @ChrispyChris3
    @ChrispyChris3 Pƙed 2 lety +2

    The way dude talks super chill and laid back, while not being monotone, AND explaining things well is pretty amazing!

  • @sapindersingh1165
    @sapindersingh1165 Pƙed 3 lety +141

    I rarely like a video on youtube and this one deserves it. These 18 minutes just leveled up my knowledge about event listeners. Thanks Kyle!

  • @sanghvian
    @sanghvian Pƙed 3 lety +33

    It's just unreal how amazing you are at teaching new concepts as well as making us rethink learnt ones with a fresh and novel direction. Thanks a lot !!!

  • @gettingComputey
    @gettingComputey Pƙed 3 lety +14

    I've seen a lot of event listener tutorials and this one is best explained. Thank you!

  • @maxathanja
    @maxathanja Pƙed 3 lety +27

    Wow, this is just what I need at the moment. You’re a lifesaver, thanks!

  • @valeriatapia1128
    @valeriatapia1128 Pƙed rokem +8

    I FINALLY UNDERSTAND event listeners!! Thanks Kyle!! You're a life saver!

  • @Bebsi42069
    @Bebsi42069 Pƙed rokem

    When looking for to wrap 1 click event listener around multiple buttons but have each button do it's own thing this pops up and is an absolute god send, now I can clean up my clunky code and publish my Accessibility extention!!!!!! Finally after weeks of errors a solution arrives in hair slick back

  • @azuboof
    @azuboof Pƙed 8 měsĂ­ci

    wait how the fuck am i understanding it all even when im tired and sleepy and not putting 100% attention its just flowing into my ears, the explanation is so simple and good. Thank you goat

  • @kirksurber7262
    @kirksurber7262 Pƙed 2 lety

    just spent 12 hours yesterday trying to figure why a delete button wouldn't function on a shopping list I'm making. Here you are explaining it in minutes lol

  • @pavkey88
    @pavkey88 Pƙed 3 lety +2

    Not only is this a great tutorial on event listeners, it’s also a great way to approach learning how to debug

  • @chandrakant6283
    @chandrakant6283 Pƙed 3 lety

    I've been struggling to understand Delegation & Event Flow, but thanx to this guy now I've understood it well and likely will never forget.

  • @quentina.3021
    @quentina.3021 Pƙed 3 lety +3

    Man, you are an awesome teacher! Best explanation/tutorial of event listeners I’ve ever seen.

  • @michaeljohnson1576
    @michaeljohnson1576 Pƙed rokem +1

    Hey there, Web Dev Simplified! I just wanted to say that your video on avoiding getting stuck on JavaScript by doing simple things really helped me. Since then, I have attempted to change the way I study JavaScript and while I can't say that I'm striding, I'm definitely moving at a faster pace. I hope you realize just how much you mean to us! Like seriously, your calm mentoring demeanor alone makes these lessons so much more watchable. Thanks a ton!

  • @reaperforever8478
    @reaperforever8478 Pƙed 3 lety

    This has made my day , I have been working on a routine app to better schedule my classes , in vanilla js with ejs as a templating engine , used a event listener to attach to a modal for picking the time but I needed some way to delete the event listener after I'm done otherwise it would change all the dates at once , this has saved soo much time

  • @richardramirez5746
    @richardramirez5746 Pƙed rokem

    It's really useful to watch your videos. You keep the same calmed speaking.. I appreciate that!

  • @davidrowlands8962
    @davidrowlands8962 Pƙed 3 lety

    I had understood bubbling since we commonly deal with it, but never really got my head around capturing until this video. Now I understand the third argument in the event parameters. This video has made it crystal clear to me. Thanks very much.

  • @Pareshbpatel
    @Pareshbpatel Pƙed 2 lety +5

    Listen up! - This is, by far , the best tutorial on event listeners I have ever come across. Thank you, Kyle
    {2021-06-29}

  • @dsvhs93
    @dsvhs93 Pƙed 3 lety +9

    Look at that fresh fade! Thanks Kyle for the lesson! Will have to watch this a little later on! But I already know it’s awesome!

  • @theomegamale5335
    @theomegamale5335 Pƙed 2 lety +1

    Already knew this stuff, but definitely a great video for those newer to events in js and i still enjoyed watching regardless. Keep up the good work!

  • @bmehder
    @bmehder Pƙed 3 lety +1

    I never knew how much I didn't know about event listeners. Excellent tut as usual.

  • @y-yyy
    @y-yyy Pƙed rokem

    So clear, pleasant to listen to and to the point. You're a legend, thank you!

  • @angelsunshine885
    @angelsunshine885 Pƙed 2 lety +6

    You Sir, my FANTASTIC teacher! Thank you from the bottom of my heart for providing such valuable and well-explained content!

  • @michaeld663
    @michaeld663 Pƙed 3 lety +1

    Thanks solved my problem with the event delegation. I spent like an hour trying to figure it out.

  • @ashkanahmadi
    @ashkanahmadi Pƙed 2 lety

    I was scratching my head for DAYS how to solve the event delegation problem. This finally solved my problem. THANK YOU

  • @abdullahsoomro6238
    @abdullahsoomro6238 Pƙed rokem

    I watched this video 2 times. To really understand the event bubbling and event capturing. You taught it really nice and simple way.❀

  • @mayankstylerock
    @mayankstylerock Pƙed 3 lety +4

    The best video of Js and u truly do justice with your channel name "Simplified". Thanks for your hard work man

  • @thewetfly9207
    @thewetfly9207 Pƙed rokem +5

    Add Event Listener for future elements blow my mind. Respect 😎

  • @PunkSage
    @PunkSage Pƙed 2 lety +4

    Excellent explanation. I think that a difference between stopPropagation vs stopImmediatePropagation was also worth mentioning.

  • @mrbjjackson
    @mrbjjackson Pƙed 3 lety

    Dude this helped clarify all my confusion about events so well. Thanks.

  • @michaelbrauner
    @michaelbrauner Pƙed 3 lety

    Oh dude. I like how your break it down and structure your tutorials. Very good.

  • @bigbtripathi
    @bigbtripathi Pƙed 2 lety

    This is the best explanation of event listeners that I have found in youtube so far.

  • @deniskotov
    @deniskotov Pƙed 2 lety +1

    Your channel is a chest of gold for me! Thanks a lot!

  • @user-jo7pd8fj5m
    @user-jo7pd8fj5m Pƙed 3 lety

    This is a breath-takingly good clarification. Subscribed for sure.

  • @parmeetsingh9766
    @parmeetsingh9766 Pƙed 3 lety

    Clean . Crisp . To the point . Hands down , thank god it was the first tutorial i saw

  • @adityapardeshi5028
    @adityapardeshi5028 Pƙed rokem

    The last one - adding the globalEventListener is a really good trick. Thanks man

  • @setyvyas2043
    @setyvyas2043 Pƙed 2 měsĂ­ci

    Very well explained, mate. Kudos!

  • @samirkhatri-dev
    @samirkhatri-dev Pƙed 3 lety

    Kyle does good and in-depth research regarding any topic. Best Video.

  • @jpd8
    @jpd8 Pƙed 3 lety +3

    Kyle your an awesome guy. You explain things thoroughly and clearly. Your pacing is perfect and the visuals you use are informative and easy to read. Keep being awesome man.

  • @Born2DoubleUp
    @Born2DoubleUp Pƙed 2 lety

    you explain things so well... im watching all your lessons.

  • @kingwoodbudo
    @kingwoodbudo Pƙed 3 lety

    This was great. Kind of spooky at the same time as I've been working on a project at work this last week involving bubbling and how to get the tool tips to only show up for the element I've on, not the parent. Lots of other good info that I plan on using. Thank you very much!

  • @raamch
    @raamch Pƙed 2 lety

    You're a leader... Who inspires many and leads the beginner warriors.

  • @Ruth5664
    @Ruth5664 Pƙed 2 lety

    This is the clearest and neatest that the Event Listeners can get. Thanks buddy!

  • @louzynerd129
    @louzynerd129 Pƙed 3 lety

    What a coincidence i just started learning js a week ago perfect timing man!

  • @lucianasuciu4798
    @lucianasuciu4798 Pƙed 2 lety +6

    You're my favorite professor :))) Your videos are amazing , i learned a lot . Thank you so much for your work !

  • @DaddyChronic
    @DaddyChronic Pƙed 2 lety

    I am doing JS since 1998 and learned a lot. Thank You

  • @AndrewMelnychuk0seen
    @AndrewMelnychuk0seen Pƙed 2 lety

    I'm coming from C++ and python and your videos have made me way less mad at javascript. Keep up the great work.

  • @leg875
    @leg875 Pƙed 11 měsĂ­ci

    Quality teaching. Seen couple of videos and landed here, you brought smile into my face. Narration matters :)

  • @ug3469
    @ug3469 Pƙed 2 lety

    Thank you very much for covering so many options for event listeners

  • @kantyDarius
    @kantyDarius Pƙed 3 lety +1

    Man... You are a real web dev simplifier👏

  • @indratejdev3691
    @indratejdev3691 Pƙed rokem

    When it comes to webdevelopment. he is one of the youtuber who explains simple,crisp and clear. Thank you so much.

  • @peksonholinificent7056
    @peksonholinificent7056 Pƙed 2 lety

    I think Kyle is cool. His English is clean and simple, knows his stuff and is a great teacher...so you know what,let me just smash that subscribe button!

  • @MecksOnwenu
    @MecksOnwenu Pƙed 3 lety +1

    This is very informative. Eventlisteners are a real deal in JavaScript DOM interactions.

  • @jsmastery1931
    @jsmastery1931 Pƙed 2 lety

    dude i swear u have special talent in simplifying stuff.....

  • @echonabin
    @echonabin Pƙed 3 lety

    I'm just searching for this and you just upload it lol, what a coincidence... Great content Kyle ❀❀

  • @_wadewilson_
    @_wadewilson_ Pƙed 6 měsĂ­ci

    Hey Kyle just wanted to say thanks for these lovely tutorials

  • @abhijeetmokale5604
    @abhijeetmokale5604 Pƙed 3 lety

    I've always wondered what does the third parameter in event listener does and Thanks to you !!!! your way of explaining makes everything easy to understand...love from INDIA !!!

  • @BillTheChill654
    @BillTheChill654 Pƙed 3 lety

    Sweet, I’ve been trying to track down some info on these. Thanks!

  • @ameyapatil1139
    @ameyapatil1139 Pƙed 2 lety

    wow dude, this is super easy and extremely informative ! splendid job.

  • @florianhoffmann8127
    @florianhoffmann8127 Pƙed 3 lety

    Thank you so much. Event delegation is a blessing.

  • @frankiefab
    @frankiefab Pƙed 3 lety +1

    I appreciate your efforts. I learnt something new.

  • @pbellomagnani
    @pbellomagnani Pƙed rokem

    This viedo is amazing, Thanks Kyle, your explanation is perfect and very useful!

  • @wilsonemmanuel1352
    @wilsonemmanuel1352 Pƙed rokem +2

    Best JavaScript explanation so far 😊

  • @zakariairkha2096
    @zakariairkha2096 Pƙed 2 lety

    Thank u much. U literally just solved my life with that event delegation.

  • @vimalathithand917
    @vimalathithand917 Pƙed rokem

    the best video on eventlisteners...great video,learned a lot of things.Really helpful ...!Thank you so much..!😄

  • @tommykelly1007
    @tommykelly1007 Pƙed 3 lety

    Great video. After watching your videos you have inspired me to make my own CZcams videos I feel I am finally ready to do so. Thanks

  • @aluuusch
    @aluuusch Pƙed 2 lety +2

    It's a very good tutorial. That being said you might wanna show the html-file shortly in the beginning of the video - just for a better understanding.

  • @danyleveque892
    @danyleveque892 Pƙed 3 lety

    As usual ,concise and well explained. Thanks.

  • @darshanndk3830
    @darshanndk3830 Pƙed 3 lety

    It really was simplified, Kyle! thanks :)

  • @puspamadak
    @puspamadak Pƙed 3 lety +1

    Wish I got this video before! As always, you have explained everything in a very simple and easy way.

  • @jeffreyjdesir
    @jeffreyjdesir Pƙed 3 lety +2

    You're such a gem, I wish I could bundle you 💎

  • @kenkinyua7036
    @kenkinyua7036 Pƙed 2 lety

    i learned a lot , this by far the best channel for me in coding ....thanks

  • @eric69969
    @eric69969 Pƙed rokem

    Best explanation ever! Thank you so much!

  • @pauldodd6909
    @pauldodd6909 Pƙed 3 lety

    Really easy to understand video of events and event listeners in JavaScript. Thank you.

  • @chander1542
    @chander1542 Pƙed 3 lety

    Looks like from the next. I dont have read docs for applying event listener. Thank you for the simplest explanation

  • @OrmHaxanThle
    @OrmHaxanThle Pƙed rokem

    I've brought so many content about JS, Node.js , ALGORITHMS, Design Patters from different instructors and I have NEVER been able to understand any of these in such depth as Kyle makes me do.

  • @LanguageSkillz
    @LanguageSkillz Pƙed 2 lety

    Love the attn to capture events! Can't find it more fully explored anywhere else.

  • @H7forReal
    @H7forReal Pƙed rokem

    best tutorial video about event listeners no doubt mane good job!

  • @bassfreack
    @bassfreack Pƙed rokem

    I love your videos!!!thank you so I much please keep them coming!!❀❀as a musician I would recommend using a De esser compression for your explanations and talkingđŸ™â€ïž

  • @ievheniiierokhin1677
    @ievheniiierokhin1677 Pƙed 3 lety

    Very clear and good explanation, great job!!!

  • @bluesteel1
    @bluesteel1 Pƙed 3 lety

    hidden gem ... kyle's once of the best instructors out there

  • @charusharma7738
    @charusharma7738 Pƙed 10 měsĂ­ci

    superb explanation kyle keep up the good work

  • @fawwazhosein
    @fawwazhosein Pƙed 3 lety

    Good video man! One thing which is also important is the closest function.

  • @darpananeja6755
    @darpananeja6755 Pƙed 2 lety

    Superb explanation and fully informational video!!

  • @tan2cang93
    @tan2cang93 Pƙed 3 lety

    thanks, bro. now I know how to implement removeEventListener() correctly

  • @imdagz4070
    @imdagz4070 Pƙed 2 lety

    You're legend! This helped me solve my problem!

  • @nightfire777
    @nightfire777 Pƙed 3 lety

    I'm watching all your videos now, great

  • @angadrajsingh4311
    @angadrajsingh4311 Pƙed 3 lety

    Thanks for sharing event delegation code. Cheers to your channel.

  • @eidenblock
    @eidenblock Pƙed 3 měsĂ­ci

    Man, i have to say thank you for you job!

  • @JohnnyCBCS
    @JohnnyCBCS Pƙed 2 lety

    very helpful Kyle, thank you so much!

  • @subathraramakrishnan5121
    @subathraramakrishnan5121 Pƙed 2 lety

    Thanks a lot .crystal clear and very helpful information on event listeners

  • @cuber_dev
    @cuber_dev Pƙed rokem

    Thanks sir I have learnt so many things from you including advanced css and basics of js now going for advanced js (Modules and js frameworks )

  • @soultouchingsongs
    @soultouchingsongs Pƙed 3 lety

    You are a treasure of knowledge.. Thank you🙏

  • @kalyanp7857
    @kalyanp7857 Pƙed 3 lety

    Teaching is an art but with precision is what Kyle has! I have been a backend guy for 04 years but now I want to do some cool UI stuff your videos are helping a lot. Thanks mate!

  • @ultradevx
    @ultradevx Pƙed 3 lety

    Thanks for sharing! You have taught me a lot! 😀

  • @giorgimerabishvili8194
    @giorgimerabishvili8194 Pƙed 3 lety

    One of the best channels on CZcams!

  • @elhakamy
    @elhakamy Pƙed 3 lety

    WOW.. First learning this.
    Thanks for sharing. You are really amazing