tobimori Posted November 15, 2022 Share Posted November 15, 2022 I have multiple horizontal scroll sections on my page, that do not take up 100vh, therefore, I'm pinning the parent element that wraps all sections. Sadly, this breaks the pin spacing calculation, as they apparently do not take triggers using the same pin element to account. (It works perfectly fine when not pinning the parent container, but I need to do that for visual reasons) Is there a way to fix this? I attached a CodePen Demo that shows the ScrollTrigger of the second horizontal scroll section starts too early. See the Pen MWGRybO by tobimori (@tobimori) on CodePen Link to comment Share on other sites More sharing options...
Solution tobimori Posted November 15, 2022 Author Solution Share Posted November 15, 2022 I found the solution myself. Specify pinnedContainer to the same element on all ScrollTrigger instances and it works! 2 Link to comment Share on other sites More sharing options...
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