Jump to content
Search Community

Trouble with order of ScrollTriggers

MaxHere test
Moderator Tag

Recommended Posts

I'm having trouble with multiple scroll triggers in one section of the page (codepen linked)

 

The goal is to have each item stick in the middle of the page, pushing the previous item up one line. In this demo it works once I scroll the full page, and then scroll back to the top. But things are misaligned on the initial load.

 

The scroll triggers should be established in the order they appear on the page.

I've tried using ScrollTrigger.sort(); with no luck.

See the Pen RwmjQbb?editors=0110 by violetoffice (@violetoffice) on CodePen

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