Jump to content
GreenSock

Chandra Shekhar

GSAP 3 Scroll Trigger Issue

Recommended Posts

Hello Everyone,

I am trying to animate the text using the new scrollTrigger Plugin, there is a glitch when the start point reaches the scroller-start, why is this happening? I am unable to figure it out.

Please help me to fix this glitch issue.

 

Thanks.

See the Pen yLeXedv by chandrashekhar (@chandrashekhar) on CodePen

Link to comment
Share on other sites

The problem is that you're nesting a scrollTrigger in a tween that's inside a timeline. By default, the timeline will start to play immediately, but the scrollTrigger pauses the tween instance it's on (a child of that timeline), thus the timeline completes immediately...and then when you scroll to the ScrollTrigger's starting point, it unpauses the tween which tells its parent "hey, the playhead has already gone past your end...wake up and adjust your startTime to jump ahead so I can play". 

 

You really shouldn't have a nested ScrollTrigger like that. It just causes logic challenges. The simple solution is to change your "tl.fromTo(...)" to "gsap.fromTo(...)". 

 

Does that clarify things? 

 

 

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