Jump to content

Jacky Yang

ScrollTrigger - multiple Scrolltrigger with the same pin element

Moderator Tag
Go to solution Solved by GreenSock,

Recommended Posts

I have two section ('.sec-3', '.sec-5') ,they have their own scroll trigger element, and have the same pin element ('.wrapper').  When scrolling into view I want the view fixed and animating my tweens, but only the first tween work, how to fix that?  thanks!

See the Pen mdLyxjM?editors=0010 by jackyyang (@jackyyang) on CodePen

Link to comment
Share on other sites

  • Solution

You need to tell ScrollTrigger that your trigger is in a pinnedContainer from an earlier ScrollTrigger. You also had multiple animations that basically had identical ScrollTrigger values, so it's better to just create one timeline with the one ScrollTrigger, and put as many animations in that timeline as you want. 


See the Pen QWrwPOe?editors=1010 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.