Jump to content
Search Community

GSAP ScrollTrigger animation problem

Hemanth test
Moderator Tag

Recommended Posts

Hi there, I'm a newbie to GSAP, and while I was working on a tutorial related demo-project, I experienced a problem related to scrollTrigger animations. Though the content is displayed, the animations aren't working at all or are getting struck in midway. Sometimes no content is getting displayed. Please help me with this. I've put my demo code in the codepen.io url :  . 

Screenshot 2023-11-15 192515.png

See the Pen VwgMgwN by Star-Bot (@Star-Bot) on CodePen

Link to comment
Share on other sites

Hi @Hemanth welcome to the forum!

 

When working with timelines, ScrollTrigger can only be on the timeline not on individual tweens. I've moved your ScrollTrigger code to the timeline and now everything seems to work as expected. 

 

Hope it helps and happy tweening! 

 

See the Pen xxMXBdZ?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

  • 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.
×
×
  • Create New...