JavaScript DOM Manipulation - Full Course for Beginners

Поделиться
HTML-код
  • Опубликовано: 28 авг 2024

Комментарии • 619

  • @CodeLab98
    @CodeLab98 2 года назад +797

    Thanks for watching everyone! I hope you enjoy the course and learn a lot from it!😎

    • @Joe-gy4jj
      @Joe-gy4jj 2 года назад +13

      This is what I was looking for and i was stuck,Thank you so much,I also subscribed your Channel.It's awesome.

    • @bappi5702
      @bappi5702 2 года назад +2

      Thanks for your hard work ❤️

    • @rasthiag0
      @rasthiag0 2 года назад +4

      Very good tho. I like the way you made it straight to the point!

    • @anxietyismymiddlename4073
      @anxietyismymiddlename4073 2 года назад

      Thank you!!!

    • @fred273
      @fred273 2 года назад

      Thank you!

  • @tati_edits11
    @tati_edits11 Год назад +209

    This is literally the perfect tutorial for beginners, he literally just explained it to us like we're 5 year olds. I love it.

    • @Balkan55
      @Balkan55 Год назад +8

      This is everything you can possibly do in Dom that you will encounter in real life.

    • @akashpandey1215
      @akashpandey1215 Год назад +10

      Fucking not catching the accent 😭

    • @Terms-and-Conditions
      @Terms-and-Conditions Год назад +12

      I wish he would explain like if we were 4 because i can't send this to my nephew now :(

    • @manishkarki8119
      @manishkarki8119 Год назад

      ​@@akashpandey1215same problem

    • @oliveryt7168
      @oliveryt7168 10 месяцев назад

      ​​@@Terms-and-ConditionsMaybe He identifies as a 5yo?

  • @miguelalejandrobritorausse5023
    @miguelalejandrobritorausse5023 2 года назад +249

    This is just great. As a venezuelan who lives in a difficult country, i want to say thank you to all of you guys for making this tutorial and for helping us to grow as a developers. Cheers my friend

    • @randallwalkerdiaz1002
      @randallwalkerdiaz1002 2 года назад +1

      Imaginate que fuerza tiene el marxismo que ni se puede hablar de la palabra del communismo o socialismo sin tener miedo de la pandilla.
      Te deseo prosperidad y que la gente no te quite cuando vos avanzas.

    • @aammssaamm
      @aammssaamm 2 года назад +15

      It cannot be more difficult than Soviet Union before the internet era, but those guys are still among the strongest programmers of the world.

    • @khoroshoigra8388
      @khoroshoigra8388 2 года назад +7

      just keep it up, don't look back just look forward for the new life awaits you bro!

    • @miguelalejandrobritorausse5023
      @miguelalejandrobritorausse5023 2 года назад +1

      @@aammssaamm Yes, they are. Cheers

    • @miguelalejandrobritorausse5023
      @miguelalejandrobritorausse5023 2 года назад +1

      @@khoroshoigra8388 Thank you My friend.

  • @kevinjordan7583
    @kevinjordan7583 2 года назад +16

    I paid for a udemy “beginner” course and the guy steamrolls through not explaining what he is doing and was too hard for me to follow. This course is perfect and the tutor explains everything as he goes through it and I understood it perfectly. Top notch thanks

    • @ladylai06
      @ladylai06 5 месяцев назад

      i enrolled into springboard which is the same instructor and i have the same issue. just watched this and learned more than what I have so far in the springboard course that i paid for....

  • @aadarshbaral4585
    @aadarshbaral4585 2 года назад +19

    Can't believe this was uploaded when I was in need of a good DOM course. Sometimes it really feels like some mysterious force knows everything you are thinking of😂

  • @future_teknokrat7585
    @future_teknokrat7585 2 года назад +50

    This might be one of the top 10 courses ever offered by free code camp. This was needed so many years ago

    • @MrPanzerDragoon
      @MrPanzerDragoon 2 года назад +4

      This....times 100. Seriously, not a lot of courses cover the DOM first. I have been struggling with JavaScript for sometime now, but with this video, it became so much clearer!

    • @juanmonster6232
      @juanmonster6232 Год назад +3

      @@MrPanzerDragoon I agree....there is also an article by "Chibuike Okere" on "Free Code Camp" that basically covers this video but in writing...it is really good.

  • @norahyde5733
    @norahyde5733 Год назад +10

    This is the bridge I needed from learning the algorithms and loops to actually being useful for making pages

  • @lycht.
    @lycht. Год назад +16

    great video.
    There is a bug in the last project; if you click the button and not the icon inside the button all the todo list will be deleted. To solve this add the following code:
    deleteButton.addEventListener('click', function(e){
    let target = e.target;
    if(target.tagName === 'I'){
    target.parentElement.parentElement.remove();
    }else{
    target.parentElement.remove();
    }
    In this way you know if the click is done on the button or on the font-awesome icon

  • @azureharris8647
    @azureharris8647 Год назад +4

    Dude your a life saver. I’m self teaching myself web development and I been stuck on this for 2 weeks until today. Thank you !!!!

    • @hanzalamehtab
      @hanzalamehtab Год назад

      ai gonna replace us find a different niche

    • @azureharris8647
      @azureharris8647 Год назад +2

      @@hanzalamehtab I’ve read that’s not happening anytime soon

    • @azureharris8647
      @azureharris8647 Год назад +2

      @@ksneeraj399 exactly. AI just isn’t smart enough for these kind of things

    • @user-ge9gg4cp8d
      @user-ge9gg4cp8d 10 месяцев назад

      @@azureharris8647 Why won't one person write all codes to AI and the sell them this programm for big money?

  • @hybridstar392
    @hybridstar392 Месяц назад

    In the 4th project, while adding the functionality for the stopwatch, you need to even add one more line of code in the Event listener of resetBtn so that when the timer is running and we reset it while it is paused, the pause button should go back to the play button too. resetBtn.addEventListener('click', function(){
    window.clearInterval(timerInterval);
    seconds = 0;
    minutes = 0;
    hours = 0;
    document.getElementById('timer').innerHTML = "00:00:00";
    document.getElementById('startStopBtn').innerHTML = ``;
    });
    In the end, I just want to thank you for explaining the course so well and literally helping me get better at it and sharper too. Thank you so much.

  • @bipuljha792
    @bipuljha792 Год назад +11

    Thanks for this video. Though theory is something I find boring so I started with the Project part directly, I really appreciate the hard work you put for this. One small add-up, in Project 4 ending when we click the reset button, the pause button was still there but it should turn to play. So, all we need inside the reset event listener, we'll change the timerStatus to stopped and change the icon for StartStopBtn to play like we did in else statement.

  • @tdematos
    @tdematos Год назад +7

    One of the best tutorials I have encountered that teaches you how to manipulate the DOM. This is a must-watch video! Thank you for this incredibly informational and detailed video!

  • @peterkabiru5144
    @peterkabiru5144 Год назад +15

    Thanks, learning a lot. More fun way of interacting with JavaScript after boring time on JS basics

    • @harrisjm62
      @harrisjm62 Год назад +1

      came here as a break from JS basics. Motivated to code, just not motivated to do highly abstract coding. I was both surprised and sad to learn that DOM manipulation isn't part of any of the certified courses.

  • @universecode1101
    @universecode1101 2 года назад +12

    Learn the basics and this is one of the most important concepts

  • @umbertogarciacabrera9534
    @umbertogarciacabrera9534 2 года назад +1

    The DOM World is more than a few videos tutorial, therefore this topics deserve one of thouse extralarge one. Thanks ones again.

  • @yashsharma5013
    @yashsharma5013 11 месяцев назад +1

    I was looking exactly for this, was getting into javascript and this video did helped a lot, the best thing was the css styling, so I kinda revised there too as I am just starting my web dev journey. Thanks a lot !

  • @AJGagliardo
    @AJGagliardo 9 месяцев назад +1

    Thanks! I was so lost on DOM manipulation as a self learner I really appreciate this video. Also it makes it funny that the captions sometimes changes DOM to 'dumb' which made me laugh 'if you want to know more about dumb events go to...' amazing tutorial (havent finished it yet but I've learned so much in the first hour.

  • @otakusong66
    @otakusong66 Год назад +1

    IT WORKED, THANKS I'VE BEEN LOOKING FOR THIS FOREVER, BUT NO TUTORIAL COULD EXPLAIN IT AS YOU DID

  • @surajpatel3778
    @surajpatel3778 Год назад +3

    I love the fact that you took your time to explain everything into details

  • @techstatus2914
    @techstatus2914 10 месяцев назад +16

    00:00 Learn JavaScript DOM manipulation to modify website elements.
    05:01 Different ways to select HTML elements in JavaScript
    15:22 Learn how to loop through and style elements using JavaScript
    20:39 Learn how to modify and manipulate element attributes and classes in JavaScript
    00:09 Understanding the difference between nodes and elements in the DOM
    35:00 Learn about traversing the DOM and sibling nodes
    45:00 Learn how to create a reveal effect using event listeners in JavaScript
    49:45 Learn about event propagation in JavaScript
    58:27 Learn about prevent default method and event delegation
    1:03:20 Using event delegation improves code quality and performance.
    1:13:28 Creating a quote generator project with HTML, CSS, and JavaScript.
    1:19:02 Styling a quote box with a button
    1:30:31 Creating a modal with DOM manipulation and styling
    01:03 Styling and animating a modal container
    1:47:27 Create an accordion to display frequently asked questions.
    1:52:55 Create an accordion with JavaScript and CSS
    2:04:02 Styling buttons and creating stopwatch functionality
    2:09:48 Creating a stopwatch with leading zeros
    2:20:00 Create a stopwatch and to-do list using JavaScript
    2:24:31 Styling and adding functionality to a to-do list
    2:35:38 Fully functional to-do list created using DOM manipulation
    Crafted by Merlin AI.

  • @alanlane5961
    @alanlane5961 2 года назад +12

    This video is fantastic, I spent so much time trying to figure out the DOM and what it does. This video course is very complete, covers a lot of material and I am happy to say that I actually understand the narrator in the video. Great job and Thank you for a great video course!!

  • @ossigen8_Shorts-Video
    @ossigen8_Shorts-Video Год назад +1

    learned html,css and taked a look at the js basic, then stopped and learned c++ for school... came back to js an watched this video, learned a lot dude

  • @beastzx18
    @beastzx18 11 месяцев назад

    No offtopic things, just the things we wanted know, appreciate your content

  • @siddharthpandey8516
    @siddharthpandey8516 Год назад +5

    This is perfect! Going to go through this whole thing. I think we can appreciate stuff like react so much more once we know this

    • @ShrishDollin
      @ShrishDollin Год назад

      Any perfect resource for React you reffered after this video & found extremely useful? Please do put it here!

    • @hai-yb3nc
      @hai-yb3nc Год назад

      @@ShrishDollin yeah pls share your own learning path. i also want to learn react after that tutorial

  • @sebastianlozano7707
    @sebastianlozano7707 Год назад

    flabbergasting tutorial about the DOM! put it into practive with a couple of differents projects and you won't ever forget it!

  • @jasmeetkaur7330
    @jasmeetkaur7330 Год назад +1

    Watched multiple videos on youtube, but this is the most detailed and clearly explained. Thank you!

  • @mastersquid7600
    @mastersquid7600 2 года назад +60

    How many people actually tried recreating the CSS just for following better😅

    • @chibuikeihunweze1512
      @chibuikeihunweze1512 10 месяцев назад +2

      I applied css in all, because without css, I won't have understood the course.

    • @rusul.994
      @rusul.994 9 месяцев назад +3

      You should recreate the CSS to improve your skills and familiarize yourself with the arrangement of elements when you see the website for the first time😊

    • @shakamangululu7075
      @shakamangululu7075 8 месяцев назад

      I know but its kinda time consuming

    • @abdulmaliklarry01
      @abdulmaliklarry01 8 месяцев назад

      I don’t know why it didn’t show that they added ccs on their own, but I had to 🙂

    • @bharanitharan.m1158
      @bharanitharan.m1158 6 месяцев назад

      Can you tell the background style

  • @jmid6358
    @jmid6358 Год назад +35

    it's really interesting and informative. it helped me a lot but it would have been better if you had shown the CSS code so we could replicate the style changes as we were testing the queries.

    • @KimCarlos12
      @KimCarlos12 Год назад

      He has a point

    • @TheFearedTurtle
      @TheFearedTurtle Год назад +9

      If you can´t replicate it I suggest you learn CSS, you'll need to learn it, besides its something that should be learned before jumping in JS.

    • @yungarepa
      @yungarepa Год назад +5

      @@TheFearedTurtle mostly ppl already know CSS and yeah always is good to practice but most of us just want to practice JS and DOM

  • @user-ge9gg4cp8d
    @user-ge9gg4cp8d 10 месяцев назад +1

    You give me awesome practise, without you, I wouldn't step out of the comfort zone!!

  • @deogenesabejuela7016
    @deogenesabejuela7016 Год назад

    After finishing your tutorial. I became confident in pure javascript coding. Amazing tutorial. God bless You!🙏🙏🙏

    • @ridhirajput7779
      @ridhirajput7779 Год назад

      const ul=document.querySelector('ul');
      const li=document.createElement('li');
      ul.append(li);
      li.innerText='X-Men';
      li.setAttribute('id', 'main-heading');
      Can you tell, why setAttribute not working for me

  • @tgk217
    @tgk217 11 месяцев назад

    i love this, came here from google discover tab on my pixel phone! Solid knowledge from the beginning to higher levels of event listener use

  • @nojoodothmanal-ghamdi1026
    @nojoodothmanal-ghamdi1026 11 месяцев назад +1

    This is just brilliant! I understood everything clearly and I liked that you also explain the concept not just only the code and how it works. Thank you so much

  • @mayank4156
    @mayank4156 11 месяцев назад +1

    This is awesome! Even made written notes for practice and so that the learning sticks. That's the best way to learn. ❤

  • @KeyserSoze-sb8vx
    @KeyserSoze-sb8vx 9 месяцев назад

    If you have multiple elements or how do you specify which exactly? Would you include the class=“” in the name? What is the distinguishing factor?

  • @okibeogomola5921
    @okibeogomola5921 2 года назад +11

    This is a great course, well paced, good structure, great flow of concepts, just wow!, great work and thank you. Just had to check your channel to smash the subscribe button.

  • @janmutewera
    @janmutewera Год назад

    finally a course which covers the fundamentals of dom manipulation and event handling

  • @mathis-meth4229
    @mathis-meth4229 2 года назад

    quincy larson has a vision of democratizing developer skills and he certainly is in war mode. Great content! ❤

  • @stevenoketch6950
    @stevenoketch6950 2 года назад +1

    I love it when freecodecamp post JavaScripts content

  • @nomwesigwaisaac7104
    @nomwesigwaisaac7104 2 года назад +5

    This is what I was looking for,thanks for the great job you're doing ⚛️🤝

  • @ambole
    @ambole Год назад +1

    Thank you Freecodecamp what you are doing here is both wonderful and really eye opening. Thank you codelab finally i feel like i am grasping javascript.Thank you

  • @Tomarika
    @Tomarika 6 месяцев назад

    thank you for the video! Your explanation is simple and clear, I enjoyed following you in part two, helps a lot with memorizing things!

  • @FarhanAli-to3ku
    @FarhanAli-to3ku 2 года назад +1

    i never explained how helpful and amazing tutorial on DOM this is and awesome channel this is..simply a best channel to learn courses for begginers as well as experts also. i will also recommend this to my class-fellows also to learn from this channel. keep giving a useful knowledge about technologies that others can't do. thanks sir good expalnation skills you have. i give a segguestion plzz explain your concepts before implementaion practically.

  • @cresthia
    @cresthia 11 месяцев назад

    Been looking everywhere for a course like this.
    will reply to this comment with my thoughts and how much this helped me when im finished with this course :)

  • @deveren
    @deveren Год назад +1

    Thank y'all FreeCodeCamp and CodeLab both are priceless

  • @vt1tov
    @vt1tov 2 года назад +2

    Thank you so much for all the content. I love this channel and admire all the knowledge you share with people.

  • @pioneer7161
    @pioneer7161 Год назад +3

    Great course! I enjoyed it like a movie. Can come back to this tutorial anytime whenever I would need this to implement in the project. Thank you!

  • @rolandtriton
    @rolandtriton 7 месяцев назад +1

    Thanks for this amazing channel, every video helped me alot

  • @howawwe3291
    @howawwe3291 Год назад +21

    Very informative and helpful tutorial. However it got harder to follow along once I got to the event listeners part. I noticed that most of the styling code for the HTML and CSS files weren't revealed. Any reason for this?

  • @tenc6491
    @tenc6491 2 года назад +5

    Thank you for this awesome tutorial.
    With due respect, I beg to say that, it would have been much better if you would have also shown your CSS codes in the tutorial.

  • @samadsiddiqui5925
    @samadsiddiqui5925 Год назад

    One of the amazing DOM Manipulation Lectures and projects I got here :)

  • @carterpaul2688
    @carterpaul2688 2 года назад +1

    This guy is the best teacher on the net

  • @funnyanimalworld7579
    @funnyanimalworld7579 2 года назад +6

    I think you can use defer atribute of script tag and move it to the top for easier readability .this atribute makes so that script tad is read after the document which is important cause you dont want to manipulate non existing tags.

  • @FarhanAli-km5id
    @FarhanAli-km5id 2 года назад +4

    Very amazing courses this channel providing and uploading..super... amazing...some practical projects in the courses can also make amazing efforts for this channel fame and papularity...

  • @ritik7906
    @ritik7906 11 месяцев назад

    one of the best beginner friendly course to learn DOM manipulation 😀

  • @Jay0179
    @Jay0179 2 года назад +2

    This goes straight into my playlist.. 👍

  • @GassCode17
    @GassCode17 7 месяцев назад

    great course, great content, thank you. we just have to change the innerhtml of the star stop button to play(green) if we click directly on the reset button without pausing the color is gonna stay orange with the pause option

  • @dinaravaleeva7588
    @dinaravaleeva7588 2 года назад +1

    Thank you for a great tutorial. It is very important not just to watch but to code even if you just copy it down. I have been looking at the code in the accordion project for about 30 min, cause nothing worked. And the devil was in the details...my script link in HTM was at the top, then I put it down before and it works!

    • @shawnconboygaming
      @shawnconboygaming Год назад

      in the css, there are "transitions". I use tab w/ Emmet abbreviations. and accidentally had one of those as "transform" instead. that was the most frustrating 30 minutes of my life trying to find out what wasn't working. I dropped all the code into chatGPT and had it check for errors and it didn't find that. Sneaky.

    • @Mojo_._Jojo
      @Mojo_._Jojo Год назад

      Haha ... i too had the same problem and was getting anxious about where the heck is the problem , but yaa after putting script inside body everything was fine . And i learnt that adding script tag inside the body is the best way to run Js as it makes sure that the whole elements are loaded before running js an doesn't give errors during execution .

    • @cmdaltctr
      @cmdaltctr 4 месяца назад

      where did u get the source code?

  • @CYBERLUST
    @CYBERLUST Год назад

    Sir thanks, at least I got a good idea of what DOM is and now what is needed is a lot of practice to get a hold on it

  • @madhousenetwork
    @madhousenetwork 2 года назад +8

    Very detailed and structured course

  • @ashishanasane9818
    @ashishanasane9818 5 месяцев назад +1

    2:20:12 copy code from line 69, 70 and paste at line 84 ------ to get play button if you click directly on Reset button while stopwatch is active.

  • @liliytrof
    @liliytrof Год назад +1

    It's the best lesson about DOM :)

  • @snex-techprogrammer5110
    @snex-techprogrammer5110 Год назад +1

    Great course, worth spending your time on it. Kudos

  • @compScientizt
    @compScientizt 10 месяцев назад

    thank you so much for this excellent course, you guys are awesome. love you!

  • @venkat.sairam
    @venkat.sairam 2 года назад +3

    Your timing is so good

  • @shahfaisal3923
    @shahfaisal3923 2 года назад +1

    Love this tutorial.
    Thanks for sharing.
    Love from Afghanistan.

  • @paschalynukwuani6930
    @paschalynukwuani6930 Год назад +1

    You are such a great teacher. Keep up the great work you do! This content was very helpful
    .

  • @abebrosiczki637
    @abebrosiczki637 Год назад +2

    Thank you so much! Learned so much I did. This is gonna very important knowledge onwards.

  • @quadriomotayo-cw4hr
    @quadriomotayo-cw4hr Год назад

    This is Amazing thanks for the video. For the last project, I added a condition that unchecks the input value should in case one mistakenly checks it

  • @ldpenrose
    @ldpenrose 2 года назад +1

    Perfect Timing!

  • @gopixus
    @gopixus 2 года назад +1

    Now I am finally understand how to build a todolist.

  • @stiepanbanjarbaru1825
    @stiepanbanjarbaru1825 Год назад +1

    So thankful for this

  • @chin-erdenegantulga475
    @chin-erdenegantulga475 Год назад +18

    Great course! Can you also please include the html and css as a starter code? so that we can copy them on our local computer and learn DOM manipluation interactively?

    • @91dgross
      @91dgross Год назад +1

      right? why would he not include the code so that we can work alongside instead of simply watching? I was excited for this tutorial until i saw that. I will not be continuing on with this tutorial because of the lack of interactivity.

    • @yungarepa
      @yungarepa Год назад +1

      In the original video from codeLab he put the code in the description

  • @doeyehof
    @doeyehof Год назад

    I'm Learning so much, you're great people.

  • @amanmaddhesia120
    @amanmaddhesia120 Год назад

    Truly speaking: this is an awesome tutorial sir, too good, loved it❤

  • @picardibenge2498
    @picardibenge2498 Год назад +1

    Amazing guidance

  • @abdulx01
    @abdulx01 2 года назад +1

    I learning DOB based-XSS Good content.
    I love to break code. 👊

  • @bahatiyves
    @bahatiyves Год назад +2

    The whole course was just amazing 😊
    this was so helpful thanks to the codelab !

  • @ichiroutakashima4503
    @ichiroutakashima4503 Год назад

    Thanks a lot for this. I managed to get a good grasp and deeper insight compared to a crash course.

  • @codewithmoiz
    @codewithmoiz Год назад

    Masterclass of a cours! Kudos🙌

  • @shivampal3669
    @shivampal3669 Год назад

    Hello Free Code Camp . This tutorial helped me a lot regarding DOM Manipulation . and yes i enjoyed this course . the 4th project was difficult for me to understand. i thought there is some predefined javascript function for creating stopwatch and we just have to show it into front-end part using dom. THANK YOU ........

  • @NonTwinBrothers
    @NonTwinBrothers 2 года назад

    Another awesome video, Derek Muller 😎 🤙

  • @dries59dep
    @dries59dep Год назад +6

    Is the HTML and css code not availible from the course which you used ? Thx

  • @jayribagchi2182
    @jayribagchi2182 Год назад

    such an awesomeeee tutorial!!! thankyou thankyou loads and tons for this

  • @mohammedharoon1167
    @mohammedharoon1167 2 года назад

    I love this very much thanks to put this course at correct time lots of love to you♥️♥️♥️♥️♥️

  • @nishantdev
    @nishantdev Год назад

    the course was well structured, learnt quiet al lot

  • @fessyhuncho
    @fessyhuncho 11 месяцев назад

    Thank you for the projects on DOM manipulation.

  • @layla_xit52
    @layla_xit52 Год назад

    Woah, great video mate!

  • @denispanarin
    @denispanarin Год назад

    Thanks a lot.
    Is there any difference?
    01:45:55
    window.addEventListener('click', (e) => {
    console.log('e')
    if (e.target === modalCont){
    modalCont.style.display = "none"
    }
    })
    VS
    modalCont.addEventListener('click', () => {
    modalCont.style.display = "none"
    })

  • @omomaighawosa570
    @omomaighawosa570 Год назад

    Thanks you so much for this man.
    I learnt alot especially from the projects🙌
    And I do like your styling too 😁

  • @tommy2naans
    @tommy2naans 2 года назад

    Very decent video, @CodeLab smashed it. Thank you @50.29 you put Event probagation, should be propagation

  • @PiyushYadav-pl9jm
    @PiyushYadav-pl9jm Год назад +2

    In the 4th and 5th project I found one issue in each:
    1) 4th project: When the stopwatch is running and you press on the "reset " button without actually pausing the watch, the counting should technically go back to zero and restart on its own without pressing the play key , so it can be achieved like this:
    startStopBtn.addEventListener("click", function () {
    if (timerStatus === "stopped") {
    timerInterval = window.setInterval(stopWatch, 1000);
    document.getElementById(
    "startStopBtn"
    ).innerHTML = ``;
    timerStatus = "started";
    } else {
    window.clearInterval(timerInterval);
    document.getElementById(
    "startStopBtn"
    ).innerHTML = ``;
    timerStatus = "stopped";
    }
    });
    resetBtn.addEventListener("click", function () {
    window.clearInterval(timerInterval);
    seconds = 0;
    minutes = 0;
    hours = 0;
    document.getElementById("timer").innerHTML = "00:00:00";

    //to cause the watch to restart without pressing the play button again👈
    let a = document.querySelector("i");
    if (a.id === "pause") {
    timerInterval = window.setInterval(stopWatch, 1000);
    }
    });
    2) 5th project: In this project when we added the delete functionality we added the event listener to the button but in the the function we are removing the parent of parent of clicked element, thinking that we will only click on the element , but that is not the case. When we click on the element inside the button , the code runs fine but when we click on the button it removes the whole task-container as the parent of parent of button is the task-container.
    so this ambiguity can be removed like this:
    addTask.addEventListener("click", function () {
    let task = document.createElement("div");
    task.classList.add("task");
    let li = document.createElement("li");
    li.innerText = `${inputTask.value}`;
    task.appendChild(li);
    let checkButton = document.createElement("button");
    checkButton.classList.add("checkTask");
    task.appendChild(checkButton);
    let deleteButton = document.createElement("button");
    deleteButton.classList.add("deleteTask");
    task.appendChild(deleteButton);
    if (inputTask.value === "") {
    alert("please Enter a task");
    } else {
    taskContainer.appendChild(task);
    }
    inputTask.value = "";
    checkButton.addEventListener("click", function () {
    checkButton.parentElement.style.textDecoration = "line-through";
    });
    deleteButton.addEventListener("click", function (e) {
    let target = e.target;
    target.parentElement.remove();
    console.log(target);
    });
    });
    Well I just removed the ".innerhtml" line from both check box button and delete button and targeted only the parent of buttons which is task and not the parent of parent of which is task-container. It can be done in a more different way keeping the icons intact.

    • @GEBO_888
      @GEBO_888 Год назад

      how about the modal project? i copied all the code.. everything was perfectly fine except to window.addEventListener. if i click to any space the modal container didn't close.
      window.addEventListener('click', function(i) {
      if (i.target === modalContainer) {
      modalContainer.style.display = 'none';
      }
      });
      did I made a mistake or what ? help please .thanks

    • @PiyushYadav-pl9jm
      @PiyushYadav-pl9jm Год назад

      @@GEBO_888 mine worked fine when I ran the code exactly as shown maybe with a little twitching, I will share if I did change something.

    • @GEBO_888
      @GEBO_888 Год назад

      @@PiyushYadav-pl9jm really? Oh my. Maybe i did something wrong. But all i did was to copy the code. Why my window.obj didn't work. Anyway thanks. I'll try to google it. Or maybe do i need some extensions to install? im using vscode too.

    • @PokemonGo-re7ue
      @PokemonGo-re7ue Год назад

      You are a life saver sir, I thought it was only me

    • @PokemonGo-re7ue
      @PokemonGo-re7ue Год назад

      I have solved this issue by increasing the padding of the element and leaving no padding on the box that contains it, that way there is a 90% the user will always click on the . Maybe this helps anyone with the same issue.

  • @hailedagmawi8109
    @hailedagmawi8109 Год назад

    Much Thanks. DOM Manipulation is intersting and fun.

  • @kabeerfcc4153
    @kabeerfcc4153 11 месяцев назад

    Very good initiative by free code camp.

  • @TrippSaaS
    @TrippSaaS 2 года назад +1

    I wish MDN had video explanations of stuff like this in the docs.

  • @devynity4507
    @devynity4507 9 месяцев назад

    Will start this!
    11/4/2023
    11:51
    16:29
    21:15 - to the future me, This is important. Come back here if you get stuck on your project, like making a new div and you need to set that div into a existing style on your css in dom

  • @abdulafeezayinla1617
    @abdulafeezayinla1617 2 года назад +2

    Saved. Thanks.

  • @hamzaHamza-km2ng
    @hamzaHamza-km2ng Год назад

    i love heytchtml all due respect to this man!!!

  • @meghasingh4467
    @meghasingh4467 10 месяцев назад

    This is called Perfection 😌

  • @sastyfanko5188
    @sastyfanko5188 Год назад

    What a superb evaluation of the Chris Palmer video. Please publish your follow-up results on Money Robot as well as if the backlinks are ever appearing in the Google Index. What indexer do you use for trying to obtain backlinks indexed?

  • @muhamadhafidh1303
    @muhamadhafidh1303 2 года назад +1

    i waiting for this courses, thx