Jump to content
Search Community

Next or Prev button and go to section

Mustafa Şatıroğlu test
Moderator Tag

Recommended Posts

hello my friend. @GreenSock I made a few updates. I added the progress bar. Everything is going great so far. Gsap is really fun. 🥰

 

I have one last question. I want the active class to be added to the menu items that are above the scroll, and to remove the active class from the menu items unless there is a scroll.

 

So let me give an example. Let's say the user went to Section 3. In this case, the active class will be added to the first 3 of the above menu items. In this case, let's say it went to section 2 by scrolling. This time, the active class will be added to the first 2 of the above menu items.

I hope I was able to explain. I tried a lot, but I'm very new to gsap and couldn't do it.

 

See the Pen LYdwmQq by mustafasatiroglu (@mustafasatiroglu) on CodePen

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...