Add and Remove Active Class on Click

preview_player
Показать описание
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). I'll help you master the latest tech here:

👉 Discord: all my courses have a private Discord where I actively participate

0:00 Solution

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

God, dude, you saved my ass. Im a beginner in javascript and I headbang over this for 3 straight days.

hunaa
Автор

Thank you so much, No other videos I've watched couldn't solve the problem this clean.

ixtiyaragayev
Автор

you really saved me about an hour man
much appreciated

sadique_x_
Автор

Bro thanks a lot
I have spent more than 5hrs with this.

TiamiyuAbdulsalam
Автор

Thank you very much for this. I was complicated myself trying to add something like this on my website but you made it so clear to understand it and the solution itself was way easier than other codes I found on the internet. Much apreciated ❤

Yunraii
Автор

Thank you very much, that was easy and on point.

kalidomar
Автор

Thank you for this explanation after few days of trying different methods finally I found your channel with perfect solution 🙌

PatrycjaOosthuizenCode
Автор

Thank you for this. Used it on a client website after watching this video.

anthonyjibueze
Автор

This tutorial was very helpful, it will be great if you create playlist that includes these kind of videos. I checked on your channel there wasn’t any of them.

I have done the basics in js like classes, objects, etc. and was struggling with finding these type of tutorials that actually matters. Sadly everyone has made the tutorials on js till basic language and their content is too length, unstructured.

Please create playlists on your channel it will help new learners allot. 🙏🙏

Ayushsingh-insi
Автор

I am subscribed your channel for this video. it helped to solve my problem

MuhammadAli-kjjc
Автор

Awesome this helps me in project thanks

darkvenom
Автор

Very clear and precise tutorial and well explained, thanks. I have two nav bars, top and bottom but this only works either top or bottom depending on which one was clicked anyone with any ideas on how to fix? Pointers welcome

photoinshot
Автор

Thanks. That single question mark saved me hours. lol

kurisu
Автор

After wasting 4hours finally now i do it

Filmy_Wallah
Автор

thanks for tutorial but what when we scroll to different section of page? it doesn't change according to that.

MadDoxXx_
Автор

How to make it so upon page refresh my first div to become or stay the current active page 😢 its accordion menu related thing i want upon refresh the first div to become the active div if its not already the active div and I want if its the current active div before the refresh to stay the active div after the refresh

hunaa
Автор

I was putting the dot thats why my code was not working..lol

Dstoic
Автор

Why use add and remove? Doesn’t “toggle” do the same?

jacoblue
Автор

I am a little confused here could anybody help me understand the following. A const navLinksEls was created but within the function, navLinksEls is being referred to as navLinksEl without the s at the end how does that work?

paulonivar
Автор

Thank you a lot! How can we do this with tailwind?

Aliena