JavaScript DOM Crash Course - Part 2

  Рет қаралды 385,710

Traversy Media

Traversy Media

Күн бұрын

In this video we will learn how to traverse and move around the DOM with properties like parentNode, parentElement, nextElementSibling and so on. We will also learn how to insert elements with createElement() and createTextNode()
CODE: Code for this video
www.traversymed...
BECOME A PATRON: Show support & get perks!
/ traversymedia
ONE TIME DONATIONS:
www.paypal.me/t...
COURSES & MORE INFO:
www.traversymed...
FOLLOW TRAVERSY MEDIA:
/ traversymedia
/ traversymedia
/ traversymedia
NEW DISCORD CHAT SERVER:
/ discord

Пікірлер: 290
@letmewatch.
@letmewatch. Жыл бұрын
14:54 thank you for not editing that out. Had a laugh and it boosted my spirit
@eS_Zett
@eS_Zett 7 жыл бұрын
00:23 Traversing the DOM Introduction 01:18 Parents 01:18 .parentNode 04:03 .parentElement 04:48 Children 04:48 .childNodes 06:36 .children 08:03 .firstChild 08:58 .firstElementChild 09:38 .lastChild & .lastElementChild 10:37 Siblings 10:37 .nextSibling 11:17 .nextElementSibling 12:04 .previousSibling 12:31 .previousElementSibling 14:12 Create Elements 14:30 .createElement() 16:50 .createTextNode() 17:27 .appendChild() 17:59 Insert Created Elements Into the DOM 18:12 .insertBefore()
@NairiAreg
@NairiAreg 6 жыл бұрын
parent children sibling...is this a porn?
@rene78
@rene78 6 жыл бұрын
@@NairiAreg Partly yes. He has forgotten one: 14:48 create new dick
@amongdoomers9464
@amongdoomers9464 4 жыл бұрын
@@rene78 lmaoo🤣🤣
@tunamusic2314
@tunamusic2314 4 жыл бұрын
thanks so much
@thearbitarygeek2463
@thearbitarygeek2463 4 жыл бұрын
thanks bruhh
@romeojoseph766
@romeojoseph766 2 жыл бұрын
I am Romeo , I am a self taught for now and I'm about 16 years old I have been learning front-end development since one and half years . fan of your work!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@casedup
@casedup 3 жыл бұрын
Duuuuude! Thanks for not editing that out. Good humor and learning just makes sense.
@LukasShannon
@LukasShannon 7 жыл бұрын
I've been following you for just a few weeks but your content is incredible! It's thorough while being accessible enough for me to start using right away. Very practical explanations, a great voice for the narrations, and a wide range of content covering all of the tools I need! Thanks a lot!
@TraversyMedia
@TraversyMedia 7 жыл бұрын
Thanks man, I appreciate that
@LukasShannon
@LukasShannon 7 жыл бұрын
Pleasure :)
@mylesdavies9476
@mylesdavies9476 6 жыл бұрын
Was about to write an almost identical comment, absolutely love this channel, thank you so much for creating these videos, they are taking my coding abilities to new levels :)
@muhammadtariq_
@muhammadtariq_ Жыл бұрын
how you guys doing? its been 5 years any progress?
@AzTreandwealth
@AzTreandwealth 7 жыл бұрын
I just want to say a MASSIVE thank you! I have been waiting for someone to create a video tutorial, specifically to do with Javascript and the DOM, and this is a simple yet outstanding one. I love these videos man. I just completed codeacademy a few times but was still a little lost in terms of how to put JS together as a web developer. This stuff has been a great help so far. I have been practicing in the console as you have been explaining and my understanding of JS and the DOM is definately expanding very quickly, and I am starting to connect the puzzle of JS a lot more. Excellent teaching style as well. Once again, many thanks!!
@iansanders6466
@iansanders6466 5 жыл бұрын
Just recently discovered your channel. This has to be the most concise series on DOM manipulation I have ever seen. Thank you so much for uploading these
@kristinaivanova4170
@kristinaivanova4170 4 жыл бұрын
I just love this guy...I was at the edge of giving up coding and decided no to by watching Brad's tutorials cause they are somehow giving me hope and his voice is my light lol
@widespectrumcreators4691
@widespectrumcreators4691 2 жыл бұрын
Me too! 🥰🤩🙂👍🏼👍🏼
@whatsup1670
@whatsup1670 2 жыл бұрын
Как идут дела?
@bricerichard6305
@bricerichard6305 Жыл бұрын
have you got a job already?
@aaryanbudhirajamusic6874
@aaryanbudhirajamusic6874 6 жыл бұрын
They can show as many ads they want whether it's in the starting of the video, in between or anywhere, I can watch all of them to learn from you. You make a difference bro. I'm in college rn, but when i start earning, you can expect a really big donation. Cheers!
@MuhammadjavohirSuratov
@MuhammadjavohirSuratov 7 жыл бұрын
Great videos, Brad. Keep it up! You are creating tons of videos lately :) Make sure to have a rest time-to-time :)
@erenkucuker-dev
@erenkucuker-dev 5 жыл бұрын
This video series really helpful. I had been working 2 weeks with javascript tutorials but you need to got these fundamentals rather than operands or something else. Thanks, brad.
@ahmedsandoqah9720
@ahmedsandoqah9720 3 жыл бұрын
We're now in 2021, can you see this kind of courses implement for fronend beginner ?
@nishanthsubramanya1931
@nishanthsubramanya1931 7 жыл бұрын
I disable my adblock when I get into Traversy Media!!! You are just awesome.
@TraversyMedia
@TraversyMedia 7 жыл бұрын
I REALLY appreciate that. Adblock is a killer for us small content creators. Many people do not care, thank you
@essanhaji
@essanhaji 4 жыл бұрын
oh shiit mine is still on , thanks for reminding me to add the channel to my allow ads list on my addblocker
@mofe620
@mofe620 4 жыл бұрын
@@TraversyMedia Hardly a small content creator now though 😊 Well done.
@cryptouniversity4109
@cryptouniversity4109 7 ай бұрын
​@@TraversyMedia you big now sir
@lynguist
@lynguist 5 жыл бұрын
traversing the dom - with traversy the don ;) thank you so much brad!
@Peywan
@Peywan 7 ай бұрын
youre so amazing brad, your tutorials ins the only ones i need for javascript. you're literally the best teacher that i didn't have!!
@rorjackson
@rorjackson 4 жыл бұрын
I would disable my ad blocker to support you as much as i can, I love your content and method of teaching, You are awesome, I hope one day I shall create something awesome and that credit will certainly go to you. Javascript was a nightmare for me as I am learning from videos only. You have made javascript so easy and fun, thank you again. Keep making more videos kindly.
@TheGerm24
@TheGerm24 7 жыл бұрын
"Should I edit that out..." I like your casual style. Its funny and engaging.
@mudassirjabbar4
@mudassirjabbar4 4 жыл бұрын
I don't know if it has to be linked or not with my previous basic knowledge of js from random platforms, but as a code newbie i would like to testify that this is the best and amazing explanation of basic Javascript...
@xhappybunnyx
@xhappybunnyx Жыл бұрын
For anyone who doesn't know (I'm sure traversy's using it nowadays), pressing ctrl-D after youve highlighted text will also select the next instance of that text it finds, so you can do edits like at 4:19 much faster
@christophercarr5865
@christophercarr5865 6 жыл бұрын
Super helpful -- this has been a much-needed supplement to the DOM section in the Udacity Front-End Nanodegree I'm working on (not their strongest section). Now I'm looking for a higher-level walk-through of the DOM's structure and function.
@asmamanzoor7341
@asmamanzoor7341 4 жыл бұрын
Thank you for this great tutorial series on DOM. I have bought your udemy javascript course and intends to buy more courses after completion. Thanks a lot for the lovely courses and tutorials.
@autumnaurora8299
@autumnaurora8299 5 жыл бұрын
"Neither one of them are inside of each other so they're siblings" Alabama : hold my beer
@OG_CK2018
@OG_CK2018 4 жыл бұрын
??
@saltysexyyy6336
@saltysexyyy6336 4 жыл бұрын
@@OG_CK2018 SWEET HOME ALABAMA INTENSIFIES
@RozArialind
@RozArialind 3 жыл бұрын
tbf child elements are inside their parent elements so...
@alexlun4464
@alexlun4464 4 жыл бұрын
Dude I swear your crash course on DOM is one of the cleanest tutorials out there. Nobody, and i mean this after using multiple resources for different topics, can explain things the way you do. I'm really having fun watching your crash course. Sorry I'm poor man can't help you on patreon.
@triptichhetri
@triptichhetri 6 жыл бұрын
Thank you so much for all the tutorials... learning about parentElement help me finish something that I was stuck on for weeks.
@dorsolomon7251
@dorsolomon7251 7 жыл бұрын
In the element insertBefore method, you can also use the "firstChild, lastChild" methods ... Great serise !!
@raymondorenda7385
@raymondorenda7385 2 жыл бұрын
Great Stuff. React.js journey started this way. Front end will soon be coded in javascript only. HTML and CSS will technically go behind the scenes.
@yatheeshgowda6191
@yatheeshgowda6191 Жыл бұрын
I seriously love the way you explain stuff but the moment I become more conscious was from 14:48
@studythainow
@studythainow 6 жыл бұрын
Really great video. I'm amazed at how little I knew about this. Thank you for the practical explanations.
@osiobeajiri1711
@osiobeajiri1711 3 жыл бұрын
Your videos are interesting and full of depth, I had to go download more of your videos. Keep up the good works.
@drummerplace590
@drummerplace590 7 жыл бұрын
Thnx, very clear and ease to consume the content you provide!!!
@adwaitshelar9769
@adwaitshelar9769 8 сағат бұрын
15:01 love the fact that it was in fact not edited out
@chimpionboy
@chimpionboy 6 жыл бұрын
This is so wow. I didn't have a clue that this could've been. Thanks Brad for sharing this tremendous know.
@XboneAus
@XboneAus 5 жыл бұрын
01:00 Brad: "Neither one of them are siblings because they are not inside each other". Alabama: uhmmmm
@OG_CK2018
@OG_CK2018 4 жыл бұрын
?
@RozArialind
@RozArialind 3 жыл бұрын
travesty: is that too much? editor: no, no. its fine keep going
@King-tp6ui
@King-tp6ui 2 жыл бұрын
14:49 I love this part
@Hattrick249
@Hattrick249 2 жыл бұрын
0:57 too lmao, what an interesting way to define what a sibling is
@maximocaceres4685
@maximocaceres4685 2 жыл бұрын
same
@mostafasalaheldin812
@mostafasalaheldin812 3 жыл бұрын
you made it so simple, thanks from Egypt
@dih12
@dih12 4 жыл бұрын
TRAVERSING THE DOM - It is nice that you got JS DOM rule based on your name :)
@photographyhub7309
@photographyhub7309 Жыл бұрын
thanks man I hope every minute of the lesson sticks to my mind as the "newDic" part did lol!
@birsingh5388
@birsingh5388 7 жыл бұрын
var newDick :) 14:50 hahaha, great humour.
@mlakshmiv78
@mlakshmiv78 4 жыл бұрын
Excellent explanation. You give me hope.
@seyedmasihsajadi8063
@seyedmasihsajadi8063 7 жыл бұрын
Thanks for this video. It was excellent. now just i have a question. why u didn't use newDiv.innerText or newDiv.textContent ?
@joshchinwendu
@joshchinwendu 6 жыл бұрын
I don't understand while people will still dislike such a nice video
@OUKUHR
@OUKUHR 2 жыл бұрын
The div joke absolutely killed me "...we can take this div and do different things with it"
@zareisajad98
@zareisajad98 3 жыл бұрын
This man is a legend.
@fanaFSF
@fanaFSF 4 жыл бұрын
Hi. Thanks for all your videos. You have a great gift for explaining things.
@omarfarooq686
@omarfarooq686 7 жыл бұрын
Love your videos man
@haileywale1527
@haileywale1527 4 жыл бұрын
i learn new method this is" Newdic()" thanks traversy!
@myklrogers4373
@myklrogers4373 6 жыл бұрын
DAAAAAHAHHAA "should I edit that out...nah"! Brilliant :D!!
@amongdoomers9464
@amongdoomers9464 4 жыл бұрын
Time?
@neoargento
@neoargento 4 жыл бұрын
14:45
@alitalaee7468
@alitalaee7468 3 жыл бұрын
thank you so much for all tutorials you teach everything so well
@kellyt6110
@kellyt6110 3 жыл бұрын
Great video, thank you for your time creating this. Quick question - 19:30 Why are two variables from the header required here...?
@user-oy6my2fg5k
@user-oy6my2fg5k 3 жыл бұрын
man, thank you so much for creating such great courses!
@AJ-le3yh
@AJ-le3yh 6 жыл бұрын
Traversy Media discussion traversing the DOM!
@codybishop7526
@codybishop7526 7 жыл бұрын
Wow, you are awesome. I went from the Coding Train JavaScript fundamentals playlist to this Dom crash course and it makes perfect sense now. We use JS to manipulate webpages by accessing the elements in the Dom. Yay. But one small observation. I think it would so awesome if after you demonstrate how to do something (like get a dom object by calling the class) you could give a real world example of why you would make this distinction. I just pulled that at random, but in general it really helps not only know HOW to do something with code but also knowing WHY you would do something a certain way. Awesome videos man!
@mnfak4333
@mnfak4333 3 жыл бұрын
Thank you for this awesome tutorial for DOM
@Glebtc
@Glebtc 3 жыл бұрын
Thank you for not editing "that" out :)
@jakebackpack8292
@jakebackpack8292 4 жыл бұрын
"Neither one of them are inside of each other so they are siblings" HAHAHAHAHAHAH
@onesandzeroes
@onesandzeroes 6 жыл бұрын
In short, vanilla javascript dom manipulation is still cumbersome and inconsistent. I'm back to jQuery. I prefer having this one extra file to avoid the torture. Probably unintended result, but this video has convinced me that jQuery is still needed :)
@christophersanchez3118
@christophersanchez3118 4 жыл бұрын
I learn faster from you specially dom manipulation. if i can get a tech job in the future i will join your patreon :D
@zropoint5899
@zropoint5899 2 жыл бұрын
Hi, Congrates for 2M subs
@parkerAmv
@parkerAmv 2 жыл бұрын
Thank you brad this is really helpful 😇
@NoahNobody
@NoahNobody 7 жыл бұрын
Nice dic joke. I'm glad you didn't edit it out.
@ademmohammed3939
@ademmohammed3939 5 жыл бұрын
LMAO 😂😂😂
@siwilson1437
@siwilson1437 5 жыл бұрын
Laughed for ages at that, caught me right off guard :D
@OG_CK2018
@OG_CK2018 4 жыл бұрын
I am so useless that i did not even get the newDic() joke...will someone pls explain D:
@noyoudidnot3513
@noyoudidnot3513 4 жыл бұрын
@@OG_CK2018 D:
@yanivsalman9685
@yanivsalman9685 7 жыл бұрын
why dislike it? you dont like go away . its damm good i dont understand why dislike something like that/ it pisses me off to see 4 dislikes
@bartmj
@bartmj 7 жыл бұрын
It's for saying "Jezus I can't type" xD it's breaking the Decalogue.
@kih9102
@kih9102 6 жыл бұрын
It's probably Brad's competition so relax.
@sergeiabramov282
@sergeiabramov282 7 жыл бұрын
Great video as always, thank you Brad!
@tech_channel110
@tech_channel110 Жыл бұрын
very well explained brad
@panchopaulo111
@panchopaulo111 4 жыл бұрын
A video of your own bloopers would be awesome.
@belmiris1371
@belmiris1371 7 жыл бұрын
This series is really great, thank you! I'm not sure which avenue to use to suggest themes for future videos so I will try it here. I know you've done Angular 2 videos for Udemy (I signed up for them) so I would really like to see a video on the basics of setting up and getting started with the ag-grid in an angular 2 project. It seems to be the only real free grid but the site is pretty random and confusing and I'm kind of confused with how to get started. As far as I can tell, if you make it, it would be pretty much the first one on the internet. Thanks again.
@barryjohnson2756
@barryjohnson2756 7 жыл бұрын
Awesome two videos. keep the hard work.
@stardommansion6773
@stardommansion6773 5 жыл бұрын
thank you for all of your videos
@nilupulperera
@nilupulperera 2 жыл бұрын
Excellent! Thank you very much.
@deepwoodsengineering3763
@deepwoodsengineering3763 5 жыл бұрын
Once again, great video boss!
@marvinespinoza8671
@marvinespinoza8671 5 жыл бұрын
"Should I edit that out?....Nah". Dead! lol
@mavoolumma
@mavoolumma 2 жыл бұрын
You are a life saver ! 🥰
@heshankumarasinghe3159
@heshankumarasinghe3159 4 жыл бұрын
Thank you.... I learnt a lot of stuff.....
@jackpaperhands
@jackpaperhands 3 жыл бұрын
BROSKI, you're a fucking legend
@iancarr3923
@iancarr3923 7 жыл бұрын
Excellent as always.
@unknownman1
@unknownman1 5 жыл бұрын
14:51 . i love his sense of humour.haha
@jbelle3177
@jbelle3177 7 жыл бұрын
ctrl + D you can select the same word
@danbarber9137
@danbarber9137 7 жыл бұрын
Jokes @ 14:50 :D
@awsmnessdesignstudio5252
@awsmnessdesignstudio5252 7 жыл бұрын
lol
@MrBestard
@MrBestard 7 жыл бұрын
haha, glad I lowered my speaker volume
@TheReverOcelot
@TheReverOcelot 6 жыл бұрын
That's why I love Brad, because he is a real human being.
@rickmediacollege9441
@rickmediacollege9441 6 жыл бұрын
The momeny you see this comment and you are on 14:20 and your like "its coming! its coming!"
@hiryuimajin
@hiryuimajin 5 жыл бұрын
Sometimes I just play your videos on autoplay even if im asleep. We don't mind if you put an ad every 10 minutes =)
@anjugarg5006
@anjugarg5006 4 жыл бұрын
thank you brad
@AbdullahMamunJust
@AbdullahMamunJust 7 жыл бұрын
just wow.Thanks thanks and thanks a lot. How can I show you that I am so gratefull to you!!?!!
@DanielK48
@DanielK48 7 жыл бұрын
Awesome videos ... all 4 of them ;)
@prashantsingh5142
@prashantsingh5142 Жыл бұрын
Thanks for sharing quality
@martins-ecke
@martins-ecke 7 жыл бұрын
that was awesome! Thank you very much =)
@abhishekshah11
@abhishekshah11 5 жыл бұрын
Elements are a special type of Node ie HTML .
@GammerAdam
@GammerAdam 7 жыл бұрын
Hi Brad! Really love your videos. One question though: why don't you upload your example code to GitHub? I think it would be much more convenient, no?
@TraversyMedia
@TraversyMedia 7 жыл бұрын
Gradam i always upload my big projects to github like framework stuff. I do so many small front end stuff i would have 300 repos. Im starting to use codepen for smaller projects
@SumitSarkar96
@SumitSarkar96 4 жыл бұрын
watching for the third time. still learning........
@shiva_tharun
@shiva_tharun 7 жыл бұрын
Thanks a Lot!!! Respects to you. =)
@juwon3426
@juwon3426 4 жыл бұрын
you're amazing thank you so much
@gonzaotc
@gonzaotc 3 жыл бұрын
Great video!
@johncrichton3372
@johncrichton3372 4 жыл бұрын
@ 14:46 - Enjoy.
@thearbitarygeek2463
@thearbitarygeek2463 4 жыл бұрын
Love the content maaaaaaaaan
@Martin958
@Martin958 3 жыл бұрын
When the element was changed to 'Hello Div' why didn't it replace the current of 'Item Lister' in the page tab?
@Peywan
@Peywan 7 ай бұрын
14:48 i busted out of laugh lmaoooo 😂😂😂😂😂😂😂😂
@kunalpandey7189
@kunalpandey7189 5 жыл бұрын
thank you for the tutorials
@vincentthamrin8252
@vincentthamrin8252 2 жыл бұрын
15:23-Done
@peteromoniyi3535
@peteromoniyi3535 6 жыл бұрын
Nice work.
@hakunamata_tuh
@hakunamata_tuh 7 жыл бұрын
awesome! part 2!
@benedictusaryasatya6761
@benedictusaryasatya6761 3 жыл бұрын
Is anyone could explain to me on 19:57 ?? He insert “newDiv” variable but as far as i know “newDiv” class is just consist of “” element. Well he add a lot of stuff on “newDiv” variable but he never store it to variable. My question is does the “newDiv” var automatically store the added information without we saving it first ? Thank you
@ruqayahn.k4645
@ruqayahn.k4645 2 ай бұрын
thanks 🌹
@feliciatimmy9467
@feliciatimmy9467 3 жыл бұрын
Thank you man
@nowyouknow2249
@nowyouknow2249 5 жыл бұрын
Thanks Brad!
JavaScript DOM Crash Course - Part 3
33:45
Traversy Media
Рет қаралды 318 М.
JavaScript DOM Crash Course - Part 1
39:01
Traversy Media
Рет қаралды 1,2 МЛН
Tilt 'n' Shout #boardgames #настольныеигры #games #игры #настолки #настольные_игры
00:24
Drink Matching Game #игры #games #funnygames #умныеигры #matching #игрыдлякомпании #challenge
00:26
Тест на интелект - Minecraft Roblox
00:19
ЛогикЛаб #2
Рет қаралды 1,4 МЛН
Strange dances 😂 Squid Game
00:22
عائلة ابو رعد Abo Raad family
Рет қаралды 29 МЛН
JavaScript DOM Crash Course - Part 4 [Final Project]
22:08
Traversy Media
Рет қаралды 291 М.
Javascript Promises vs Async Await EXPLAINED (in 5 minutes)
5:50
Roberts Dev Talk
Рет қаралды 631 М.
Node.js Crash Course
2:06:35
Traversy Media
Рет қаралды 301 М.
Turn 2 Eggs Into Fluffy Japanese Soufflé Pancakes!
5:26
CookingAtHome
Рет қаралды 3,7 МЛН
DOM API - JavaScript Tutorial for beginners
42:17
ColorCode
Рет қаралды 42 М.
Learn DOM Manipulation In 18 Minutes
18:37
Web Dev Simplified
Рет қаралды 1 МЛН
JavaScript Interview questions everyone gets wrong
6:40
Catherine Li
Рет қаралды 32 М.
JavaScript Crash Course For Beginners
1:40:30
Traversy Media
Рет қаралды 4,1 МЛН
JSON Crash Course
24:49
Traversy Media
Рет қаралды 1 МЛН
These CSS PRO Tips & Tricks Will Blow Your Mind!
8:48
Coding2GO
Рет қаралды 566 М.
Tilt 'n' Shout #boardgames #настольныеигры #games #игры #настолки #настольные_игры
00:24