Share Posted December 31, 2022 Hi folks, I'd like to control the scroll behavior by forcing it to scroll to the next section. I've tried to follow this example See the Pen NWxNEwY by GreenSock (@GreenSock) on CodePen but my pen isn't working. It is stuck to the first section. Do you have any idea why that's happening? Here is my demo: Thanks in advance See the Pen LYBNovZ by maqquo91 (@maqquo91) on CodePen Link to comment Share on other sites More sharing options...
Solution Solution Share Posted December 31, 2022 The main problem is a logic one - you're first section actually starts a little more than 100vh from the top, but you've got things set up based on the index so that the first section scrolls to 0 (very top). But you actually want it to scroll to that first section which is a little more than 100vh from the top. Here's a fork where I tap into the ScrollTriggers' "start" value for the positioning: See the Pen YzjWzgv?editors=0010 by GreenSock (@GreenSock) on CodePen Is that more like what you wanted? 1 Link to comment Share on other sites More sharing options...
Author Share Posted January 1 Thanks a lot, Jack, that is exactly what I wanted to achieve. And happy new year. 1 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