How to Add Active Class in Javascript

How to Add Active Class in Javascript

KodeBase

4 года назад

33,138 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@blackpurple9163
@blackpurple9163 - 17.01.2023 07:37

How to make it even shorter, like using .toggle() method, so that active class only gets added first then removed (when clicked)?

Ответить
@mohamedsultan3216
@mohamedsultan3216 - 11.12.2022 20:31

Short easy and simple guide to a very useful functionality.

Ответить
@rameshnayak3521
@rameshnayak3521 - 04.11.2022 18:49

प्रकाश

Ответить
@uliasuprun838
@uliasuprun838 - 22.09.2022 19:54

wow, so easy and great! thanks a lot!

Ответить
@ShivamSharma-fu8hb
@ShivamSharma-fu8hb - 05.09.2022 09:54

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

Ответить
@nl6294
@nl6294 - 24.08.2022 20:13

Best

Ответить
@mutagakihahu1925
@mutagakihahu1925 - 16.06.2022 16:54

Finally, the answer I have been looking for. Thanks.

Ответить
@avinashb9752
@avinashb9752 - 27.05.2022 10:01

Thank u Very much bro. this Helped me to complete my assignment.....

Ответить
@KhalilCh
@KhalilCh - 13.05.2022 15:09

I need to add a class to a class without id without click or any mouse event

Ответить
@paborlouise319
@paborlouise319 - 08.05.2022 14:18

Short easy and simple guide to a very useful functionality. 👌

Ответить
@misbahdev8210
@misbahdev8210 - 28.04.2022 15:23

waw man, this is very very simple, I googled almost everything a little bit complicated, but your solution is very simple and easy to understand 😃

Ответить
@tikri_gaming
@tikri_gaming - 14.04.2022 21:14

thank you so much sir it really helped me and please do make such helpful videos whenever you get time.

Ответить
@Vladimir-yh2dl
@Vladimir-yh2dl - 29.01.2022 14:05

how to save the selected class active in localStorage ?

Ответить
@Karina-bv1rl
@Karina-bv1rl - 20.01.2022 11:45

I agree with all the praise! On the whole internet so many difficult and not working solutions, and yours is a gem out there. So happy to find you. Good luck there!

Ответить
@salmanfarshe2897
@salmanfarshe2897 - 23.12.2021 04:56

brother really really thanksss :}:}:}

Ответить
@elenapetrova4964
@elenapetrova4964 - 15.10.2021 14:49

Thank you SO MUCH! This is what I've been looking for for a long long time!

Ответить
@kbcaSanthoshkumarA
@kbcaSanthoshkumarA - 30.09.2021 05:19

why to use this keyword ,explain this

Ответить
@najmulhaque6921
@najmulhaque6921 - 16.08.2021 21:36

why use forEach loop 2 times?

Ответить
@MrWebDesignerAnas
@MrWebDesignerAnas - 20.06.2021 10:31

thank you so much

Ответить
@uwizeyejackson5836
@uwizeyejackson5836 - 20.05.2021 20:32

Thank you so much

Ответить
@ruslanrahimov5483
@ruslanrahimov5483 - 24.03.2021 23:28

Hey man, thanks a lot for this brilliant solution!!!

Ответить
@mohamedekwa3777
@mohamedekwa3777 - 22.01.2021 03:17

✔✔✔

Ответить
@ck0024
@ck0024 - 24.12.2020 13:49

Nice... But need more explanation why and how it is working... It will help beginner like me. And do this same thing using array map method please. Video length doesn't matter we need clear explanation.

Ответить
@shayanfaghihi
@shayanfaghihi - 24.10.2020 20:29

Thank bro! You bought me a lot of Time. Good Luck

Ответить
@Seriescompiladas
@Seriescompiladas - 31.08.2020 18:40

I am really feeling an idiot, why I didn't think in this way before watching this video. Thank you so much, it helped a lot

Ответить
@Marcelo-oc5yn
@Marcelo-oc5yn - 20.08.2020 01:01

good and quick solution!

Ответить
@stevematin6050
@stevematin6050 - 20.07.2020 22:27

good explanation thank you!

Ответить
@pallavipatil756
@pallavipatil756 - 13.07.2020 09:45

Where is active class in html page

Ответить
@darlyssonfelipe9200
@darlyssonfelipe9200 - 06.07.2020 13:14

Thank you Sir! Awesome useful tutorial.

Ответить
@Rakka29
@Rakka29 - 09.06.2020 21:23

man, I have been looking for this for ages. your solution is so simple and most importantly WORKING!!! thank you!!!

Ответить
@kolyxix
@kolyxix - 01.05.2020 15:48

create video. Question. where did you get the 'btn' from? I am a little confused because 'btn' is not in the html or css. is 'btn' a variable?

Ответить