Add Remove Active Class On Click – Html CSS and Javascript

37
2



Also Watch This : Add Remove Active Class Based On URL Using Javascript only
Video Url :
——————
Enroll My Course : Next Level CSS Animation and Hover Effects

——————
Join Our Channel Membership And Get Source Code Everyday
Join :
——————
Please LIKE our Facebook page for daily updates…

Nguồn: https://potomacstewards.org/

Xem thêm bài viết khác: https://potomacstewards.org/tong-hop/

37 COMMENTS

  1. Watch This : Add Remove Active Class Based On URL Using Javascript only

    Video Url : https://www.youtube.com/watch?v=BI3kNsTruWo

  2. It works only because you didn't added href
    If you do add a link to another page it will reload the script and the Home page will still have the class active.
    I even tried to make the navbar in a separate folder and add it to each page with php code "require" and I still get same result.
    Am I doing something wrong?

  3. Thank You so much i am making a website, thepurplelounge.com, and this was very helpful. feel free to check it out and give feedback on the current product on my insta @purplounge

  4. I think you should have made this with "pure JavaScript", with querySelectorAll. And to code toggle classes there is a method that I cannot remember right now.

  5. Sir I have faced some problem while using this code…whenever I navigate to another link it will not work….so please do something…

LEAVE A REPLY

Please enter your comment!
Please enter your name here