Jump to content
Search Community

smooth scroll - isScolling active class

Stoggy test
Moderator Tag

Recommended Posts

Hi, I've been trying to figure out a way to add an active class to my smooth scroll container while scrolling is being done. And having that class removed as soon as I stop scrolling.

 

What I've come up with so far is to add the class with the onUpdate() callback and then remove it using  onScrubComplete()

 

Is there a smarter way to do this with gsap?

 

I'm using the smooth scroll setup used in the attached example:
 

See the Pen gOgWELo by GreenSock (@GreenSock) 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...