DD77 Posted May 26, 2021 Share Posted May 26, 2021 I'm quite stuck here, as I need a class active on the navigation Menu. - the current section should have the relative menu active. is it possible to achieve this? I used to use className - and + but I know is not longer supported. I'm also terrible confused with how the toggleClass/toggleAction works. Please come to the rescue . . . See the Pen vYxZMxB by davide77 (@davide77) on CodePen Link to comment Share on other sites More sharing options...
Solution _Greg _ Posted May 26, 2021 Solution Share Posted May 26, 2021 Hi @DD77 I'm not sure that i understand you well 12 minutes ago, DD77 said: I'm also terrible confused with how the toggleClass/toggleAction works. toggleClass add/remove class to trigger element I add in css .active { color: red !important; } and change panels.forEach((panel, i) => {....} part See the Pen gOmRyRP?editors=0110 by gregOnCodePen (@gregOnCodePen) on CodePen That what you need? 1 Link to comment Share on other sites More sharing options...
Cassie Posted May 26, 2021 Share Posted May 26, 2021 Hi pal, I replied to your other question. Here's the pen I linked to to demo toggleClass See the Pen ba2c5243a07686ef1fdbcb0f9c76a10b by cassie-codes (@cassie-codes) on CodePen Here's a demo to show when the events that influence the toggleActions states fire - See the Pen e5a513ccbf59d14b207e080793407167 by cassie-codes (@cassie-codes) on CodePen Hope this helped - In future can you avoid posting duplicates, as it can double the effort put in from folks trying to help and make things a bit confusing. Thanks! 5 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now