Ashewer Posted August 11, 2022 Share Posted August 11, 2022 I am new to gsap, and working off an example for the horizontal scrolling slideshow. For some reason the first slide shows, and then it scrolls over but the next slides are not visible. If anyone can explain why this behavior is occurring that would be very helpful. Attached a minimal example on copepen. See the Pen gOejNNV by Ashewer (@Ashewer) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted August 11, 2022 Solution Share Posted August 11, 2022 That's because you set up all your slides to be stacked VERTICALLY. Eliminate ScrollTrigger and look at your layout. Perhaps you intended to do something like this?: See the Pen abYabOB?editors=0010 by GreenSock (@GreenSock) on CodePen Usually your CSS/markup is pretty important when you're setting up scroll-related stuff. I just used Flexbox to set all the slides side-by-side. Then when the ScrollTrigger animation moves it along the x-axis while pinned, it looks like it's scrolling horizontally. I hope that helps. 1 1 Link to comment Share on other sites More sharing options...
Ashewer Posted August 12, 2022 Author Share Posted August 12, 2022 That was the issue, not sure how I didn't clue into that before. Thanks! 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