JavaScript Tip: Using Pseudo-classes with querySelectorAll

preview_player
Показать описание
Because querySelector and querySelectorAll use CSS selectors for grabbing DOM elements, they can be very powerful. However, we sometimes forget what they are capable of. In this tutorial we delve a bit into that by using querySelectorAll with pseudo-classes.
For more resources on JavaScript:

Interested in some of our courses:

Tutorials referred to in this video:
Рекомендации по теме
Комментарии
Автор

this was exactly what i was looking for, thanks

biscuitmanz
Автор

I was reading on this and the NodeList prototype does have a few methods including forEach(). In Chrome I do not need to convert into an array to use forEach() now. Great videos!

Dylan-fehn
Автор

In the event handler, i'm not sure what the 'this' keyword is referencing, but i'm guessing 'this' refers to the function parameter '(elem)', correct? or am I wrong?

romanmontoya
Автор

How can access and change a backgroundcolor and backgroundimage in a pseudo element after in javascript? Plsss answer me ASAP

dexterbiscopa
Автор

Hey how can we access/manipulate the contents of ::marker element using QuerySelectorAll? Any help would be great

ramraut
Автор

I'm kinda confused, I thought a statement returns an array by default. Why the second line of code then ?

joviruona
Автор

but when i try to store ::before pseudo element and console.log it to console it says *null*

whizzkkid