Learn DOM Navigation in 15 minutes! 🧭

preview_player
Показать описание
#JavaScript #tutorial #course

00:00:00 introduction
00:01:25 .firstElementChild
00:04:33 .lastElementChild
00:07:02 .nextElementSibling
00:10:03 .previousElementSibling
00:11:48 .parentElement
00:12:55 .children
00:15:04 conclusion

// DOM Navigation = The process of navigating through the structure
// of an HTML document using JavaScript.

// .firstElementChild
// .lastElementChild
// .nextElementSibling
// .previousElementSibling
// .parentElement
// .children
Рекомендации по теме
Комментарии
Автор

// DOM Navigation = The process of navigating through the structure
// of an HTML document using JavaScript.

// .firstElementChild
// .lastElementChild
// .nextElementSibling
// .previousElementSibling
// .parentElement
// .children

// .firstElementChild

const ulElements =

ulElements.forEach(ulElement => {
const firstChild = ulElement.firstElementChild;
= "yellow";
});

// .lastElementChild

const ulElements =

ulElements.forEach(ulElement => {
const lastChild = ulElement.lastElementChild;
= "yellow";
});

// .nextElementSibling

const element =
const nextSibling = element.nextElementSibling;
= "yellow";

// .previousElementSibling

const element =
const prevSibling =
= "yellow";

// .parentElement

const element = document.getElementById("ice cream");
const parent = element.parentElement;
parent.style.backgroundColor = "yellow";

// .children

const element =
const children = element.children;

=> {
child.style.backgroundColor = "yellow";
});

BroCodez
Автор

You have been tremendously helpfull during my learning journey in my bootcamp. Thank you so much!

anthonypon
Автор

Thank you so much!! I have not words dear.

MulusewWase-rb
Автор

ahh finally, i watching all of your new js playlist its helpful to get me understanding js can't wait for the next content. Thank you bro😁🎉

zappmen
Автор

Hey Bro Code, I really enjoy your videos and I have learnt a ton from you! I was wondering if you had a patreon page or a donation page or something, cause I really want to support you!

darkslopegaming
Автор

I still don't get it why I don't see your uploaded videos on my subscription feed.

What's wrong with my YouTube account?

shafiq_ramli
Автор

Bro I see that you select your line to copy it on the new line, VS Code has this very useful key command that wiothout selecting duplicates the current line it's ALT+SHIFT +D i really am addicted to this way

xzex
Автор

How did you know I was having this exact lesson TODAY?

JarvisBaileyVA
Автор

hey bro code how about "asm" full course?

saikikusou
Автор

Does anyone know when he will release the full course?

kvo
welcome to shbcf.ru