Jump to content
Search Community

How to pin section in scrollTrigger?

azadsarxanli test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

  • Solution

Hey there @azadsarxanli,

 

The trick with scrollTrigger pinning and triggers is usually to use a container element as the trigger and pinned element.. If you use the element you're animating when the element moves the trigger positions can change and cause jumps 🙃

Here's a fork where I'm using the container as a trigger, and pinning that container.

See the Pen gOxBoGp?editors=0010 by GreenSock (@GreenSock) 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...