jquery toggleClass not working
You just need to toggle class for the current clicked link, and before that, remove active and focus class for all links, like this: Expand snippet
You just need to toggle class for the current clicked link, and before that, remove active and focus class for all links, like this: Expand snippet
If your element exposes class A from the start, you can write: This will remove class A and add class B. If you do that again, it will remove class B and reinstate class A. If you want to match the elements that expose either class, you can use a multiple class selector and write: