Jump to content
Search Community

Scroll Trigger: How to play the whole animation not by every page scroll once it enters the trigger element?

Laurence test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I have this animation that plays on every page scrolling. What I want to achieve is to play the whole animation from start to end once it enters the section. So when it enters the pinned element, it should play the whole animation, not by every page scroll.

 

A good reference is in here to better understand what will be the output
> https://squareup.com/us/en/why-square under `Look and feel like a pro` section.


Is this possible using scrolltrigger and gsap? I'm very new to this jquery plugin and still discovering the features and controls of this.

 

 

See the Pen jOxVMYy by laurence-albano (@laurence-albano) on CodePen

Link to comment
Share on other sites

6 minutes ago, Laurence said:

I have this animation that plays on every page scrolling. What I want to achieve is to play the whole animation from start to end once it enters the section. So when it enters the pinned element, it should play the whole animation, not by every page scroll.

 

A good reference is in here to better understand what will be the output
> https://squareup.com/us/en/why-square under `Look and feel like a pro` section.


Is this possible using scrolltrigger and gsap? I'm very new to this jquery plugin and still discovering the features and controls of this.

 

 

 

Link to comment
Share on other sites

Wow! Thanks!  Didn't know it was possible.

 

One more thing, how do we get rid of the pin-spacer extra height/padding when scrolling down? I can see that there's a lot of extra spacing when you scroll up/down before proceeding to another section.

 

I have reference this, it says to hardwire it on update function. I have tried several methods and can't seem to get it to work onUpdate function on my end..

 

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...