Add and Remove Active Class on Click

  Рет қаралды 35,379

ByteGrad

ByteGrad

Жыл бұрын

👉 NEW React & Next.js Course: bytegrad.com/courses/professi...
Hi, I'm Wesley. I'm a brand ambassador for Kinde (paid sponsorship). I'll help you master the latest tech here:
👉 NEW React & Next.js Course: bytegrad.com/courses/professi...
👉 Professional JavaScript Course: bytegrad.com/courses/professi...
👉 Professional CSS Course: bytegrad.com/courses/professi...
👉 Discord: all my courses have a private Discord where I actively participate
🔔 Email newsletter (BIG update soon): email.bytegrad.com
0:00 Solution
#webdevelopment #coding #programming

Пікірлер: 33
@huna7a
@huna7a Жыл бұрын
God, dude, you saved my ass. Im a beginner in javascript and I headbang over this for 3 straight days.
@ash_of_hope519
@ash_of_hope519 2 ай бұрын
What the hell same man :o !
@ixtiyaragayev2406
@ixtiyaragayev2406 Жыл бұрын
Thank you so much, No other videos I've watched couldn't solve the problem this clean.
@sadique_x_
@sadique_x_ Жыл бұрын
you really saved me about an hour man much appreciated
@TiamiyuAbdulsalam
@TiamiyuAbdulsalam Ай бұрын
Bro thanks a lot I have spent more than 5hrs with this.
@Yunraii
@Yunraii 11 ай бұрын
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 ❤
@mdabdulahallnomantuhin3621
@mdabdulahallnomantuhin3621 Ай бұрын
Thank you very much brother😊😊😊
@kalidomar2531
@kalidomar2531 Жыл бұрын
Thank you very much, that was easy and on point.
@MuhammadAli-kj9jc
@MuhammadAli-kj9jc 10 күн бұрын
I am subscribed your channel for this video. it helped to solve my problem
@anthonyjibueze8413
@anthonyjibueze8413 5 ай бұрын
Thank you for this. Used it on a client website after watching this video.
@patrycjaszymanek4358
@patrycjaszymanek4358 5 ай бұрын
Thank you for this explanation after few days of trying different methods finally I found your channel with perfect solution 🙌
@sebastianlozano7707
@sebastianlozano7707 11 ай бұрын
I spent 2 hours trying to do it man!
@piano_izi
@piano_izi Жыл бұрын
God bless you!
@krishnavamsi1126
@krishnavamsi1126 19 күн бұрын
thanks guru
@SaumilGupta31
@SaumilGupta31 Жыл бұрын
Thanks alot 😇😇
@Ayushsingh-in1si
@Ayushsingh-in1si 11 ай бұрын
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. 🙏🙏
@photoinshot1355
@photoinshot1355 8 ай бұрын
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
@sotorius_27
@sotorius_27 11 ай бұрын
you're the best dude
@saravafaei7708
@saravafaei7708 Жыл бұрын
Awesome ❤
@kurisu26
@kurisu26 Жыл бұрын
Thanks. That single question mark saved me hours. lol
@user-ee6rx4es5l
@user-ee6rx4es5l 4 ай бұрын
thanks a lot
@darkvenom4469
@darkvenom4469 8 ай бұрын
Awesome this helps me in project thanks
@Entertainment.Tube0
@Entertainment.Tube0 7 ай бұрын
awesome...
@JulioCesar-hh9wq
@JulioCesar-hh9wq 6 ай бұрын
Thank you
@Chinupatra_05
@Chinupatra_05 7 ай бұрын
After wasting 4hours finally now i do it
@MadDoxXx_01
@MadDoxXx_01 10 ай бұрын
thanks for tutorial but what when we scroll to different section of page? it doesn't change according to that.
@huna7a
@huna7a Жыл бұрын
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
@jacoblue5245
@jacoblue5245 4 ай бұрын
Why use add and remove? Doesn’t “toggle” do the same?
@Dstoic
@Dstoic 2 ай бұрын
I was putting the dot thats why my code was not working..lol
@paulonivar5678
@paulonivar5678 Жыл бұрын
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?
@mestayno
@mestayno Жыл бұрын
In my understanding he could've named whatever that element. It just means that for each of those elements individually. He could've named it something like element, el, or even rabbit
@R3dPeel
@R3dPeel Жыл бұрын
As Atilla said, you can name it anything but he used navLinksEl to refer to the buttons.
@Aliena92
@Aliena92 6 ай бұрын
Thank you a lot! How can we do this with tailwind?
Pure CSS Smooth Scroll on Link Item Click to Page Section
4:55
Why use Type and not Interface in TypeScript
14:12
ByteGrad
Рет қаралды 194 М.
Became invisible for one day!  #funny #wednesday #memes
00:25
Watch Me
Рет қаралды 53 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 68 МЛН
🌊Насколько Глубокий Океан ? #shorts
00:42
Web Developer Roadmap (2024) - Everything is Changing
25:02
ByteGrad
Рет қаралды 299 М.
Top 10 CSS One Liners That Will Blow Your Mind
13:34
developedbyed
Рет қаралды 918 М.
How to Make Link Item Active when Scrolling past Section
27:59
How To Create Tooltips with HTML & CSS Only (no JavaScript needed)
9:09
Vladyslav Dihtiarenko
Рет қаралды 244
Make Nav Link Active For Each Page With JavaScript
13:58
ByteGrad
Рет қаралды 35 М.
Subtle, yet Beautiful Scroll Animations
5:04
Beyond Fireship
Рет қаралды 1,6 МЛН
How to Toggle CSS Classes With JavaScript
8:16
The Wheelchair Guy
Рет қаралды 4,1 М.
Build a Slide out Hamburger Menu with HTML, CSS & JavaScript
16:27
Tyler Potts
Рет қаралды 111 М.
Samsung Galaxy 🔥 #shorts  #trending #youtubeshorts  #shortvideo ujjawal4u
0:10
Ujjawal4u. 120k Views . 4 hours ago
Рет қаралды 2 МЛН
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 6 МЛН
Самый дорогой кабель Apple
0:37
Romancev768
Рет қаралды 309 М.
ИГРОВОВЫЙ НОУТ ASUS ЗА 57 тысяч
25:33
Ремонтяш
Рет қаралды 344 М.
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,6 МЛН