Jump to content
GreenSock

Premium Funding

ScrollTrigger Activate Counter

Go to solution Solved by Cassie,

Recommended Posts

Hi GSAP Guys, 

I am trying to get this to work. When you scroll down the number counter activates when section comes in to view, then starts the counting up of the numbers.

But this isn't working, I know something is wrong but can't figure it out.

See the Pen xxYLjYq?editors=1011 by james182 (@james182) on CodePen

Link to comment
Share on other sites

  • Solution

Heya! *Guys (and Gals) over here.

So I see what you were trying to do over here! Makes perfect sense. But those functions were being called immediately. You can pop those function calls into another function that only gets called when the callbacks fire.

See the Pen yLvoqmr?editors=0011 by GreenSock (@GreenSock) on CodePen

 

Alternately just pull it out into it's own ScrollTrigger

See the Pen eYVEjXw?editors=0011 by GreenSock (@GreenSock) on CodePen

 

Hope this helps!

  • Like 2
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.
×