MaxHere Posted June 13, 2024 Posted June 13, 2024 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.
Solution Rodrigo Posted June 13, 2024 Solution Posted June 13, 2024 Hi, This is mostly about the logic to create and set the ScrollTrigger instances for pinning the elements and moving them. Maybe something like this: See the Pen PovOaBp by GreenSock (@GreenSock) on CodePen. Hopefully this helps. Happy Tweening! 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now