How to add and remove active class on click - HTML CSS and Javascript

preview_player
Показать описание
how to add and remove an active class on click with HTML CSS, and javascript. add active class to the current element with javascript. how to add and remove the active class in javascript.
keep with us I'll bring some other greats projects on web development.
tell us what do you want to learn. comment and like.
don't forget to subscribe.

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

this is so simple and yet so frustating when you cant do it. THANK YOU VERY MUCH <3

riteshgsh
Автор

Thanks! I couldn't figure it out for more than two weeks. And finally I came across this video and my problem was solved.

kmlfetk
Автор

This is just what I needed, simple and direct, thanks.

axelgutierrezguevara
Автор

thank you so much sir!!🙏 you help me to solve my problem

chhaylihour
Автор

this video code is working .. Thnak you sir...

ceuhyec
Автор

how can you also add the active class when scrolling through the page sections ? thank you!

alphamx
Автор

ur coading font size are to much small....kindely upload big font coading

junaeidahmed
Автор

it's not working, it's showing the nodelist in consolde but doesn't change the active class, moreover, on refreshing the page the page just goes white and it starts showing error

paramgandhi
Автор

Uncaught TypeError: Cannot read properties of null (reading 'querySelectorAll')

but console showing me this error.

kamalpreetsingh
Автор

Can someone explain me why We first remove active class from all navlinks and then again add on all navlinks

ShivamSharma-fuhb
join shbcf.ru