Jump to content
Search Community

ScrollTrigger -- how to set a class on reverse

LSchneiderman test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I have a trigger that works correctly scrolling forward, but not backward. Going forward, I want the navbar to change from highlighting Part 1 to highlighting Part 2 at a certain point, then to change from highlighting Part 2 to highlighting Part 1 when you scroll backward past that point. My code doesn't work for the backward scrolling part. What am I doing wrong please?

See the Pen xxYRwGX?editors=1111 by lschneiderman (@lschneiderman) 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...