JavaScript DOM Tutorial #4 - The Query Selector

preview_player
Показать описание

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
Other tutorials:

----- JAVASCRIPT FOR BEGINNERS:

----- CSS FOR BEGINNERS:

----- NODE.JS TUTORIALS

============== The Net Ninja =====================

================== Social Links ==================

Рекомендации по теме
Комментарии
Автор

will return single element

will return collection of elements

Thank You !!

webapplicationguide
Автор

querySelectorAll returns a NodeList in which we can apply a forEach() method directly!
No need to convert it into an array!
Your student from Udemy :)

ChrisMits
Автор

Your teaching style is great everything is very clear i under stood css animations from your videos and now javascript thumps up love yr tutorials better then paid ones out there which i have but still watching yours
☺️☺️☺️☺️😊😊

amansharma-lpfm
Автор

after watching your first 4 videos of javascript, I started loving it after I decided to quit learning. you are the best

cherry-lpyq
Автор

It's great for you to connect 'querySelector' to jQuery selector. I got it now. Thanks a lot!

Cho
Автор

4:16 - This class has a span of name. 😜 Great tutorial btw.

jazzorgangrooves
Автор

3 years later and this tutorial is still a Gold...

DigitalEmma
Автор

I think, it is very impotrant to add differences between querySelectorAll and other methods. querySelectorAll return a static collection, while getElementsByClassNmae return dynamic one. If some element was dunamiclly added to a page, variable, which contain collection, would dynamicly changes

sergeyphilippenko
Автор

"this class has a span of name"...that made me smile and chuckle a little. so cute. 4:15

christinec
Автор

This works so nicely, especially when you can't find or dont have immediate access where the original code in linux and need a quick fix like changing an href attribute.

genjimccorkle
Автор

I know this is a long time ago but thank you for the help. I finally understand how to use querySelectors now

DJDELLANNIE
Автор

If you want to be REALLY fancy you can also convert the nodeList (which is what querySelectorAll returns) to an array by doing const books = li .name')]

chrisdascoli
Автор

At least in modern browsers .querySelectorAll() returns a NodeList, which has the .forEach() method

MrPretoriaS
Автор

So how is that different from getElementByID method? Don't they do the same thing?

zeroxcrusher
Автор

I don't know why this video has fewer views, this could help tons of people who want to know more about JavaScript.

shumonuddin
Автор

This video is doubly amazing because of the nod to Patrick Rothfuss!

corbettknoff
Автор

I like vanilla javascript because I always wanted a challenge

mrcoder
Автор

I highly appreciate your tutorials; they are concise, to the point and super helpful. Thanks a lot, subscribed!
I’ve already worked through some of your JavaScript tutorials, especially through your complete ES6 tutorial. Therefore, I have a kind request: Could you please stick from now on to ES6? For someone like me to whom JavaScript/ES6 is still fairly new, it would simplify things, as I don’t have to double check whether there is an ES6 way of writing that code. Thanks!

mariansand
Автор

thank you for your great effort for helping us. I wanna ask you ask you a question. which is better, watching the all video then applying, watching a rule then applying then returning back to the video?

ahmedfarid
Автор

Just going through this set of learning in 2022 (One of the best teachers around) and found that .name (well for me anyways) should be span.name in order to get the same result.

LJ-lwqd