Share Posted April 12, 2022 Hello there, I have this script in use and it works great. My question now is, how to add a stop at the last slide and start the vertical scrolling with a button. Is that possible? Thanks for your help! Mirja See the Pen WNjaxKp by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Share Posted April 12, 2022 Hey, The current code stops at the last slide (the black colour section appears as a natural web page flow). Where do you want the button to be and the content you want to show is that a part of the last slide? or the normal webpage flow? Depending on what it is you can structure the code. Looks like what you are trying to do is possible. Link to comment Share on other sites More sharing options...
Author Share Posted April 12, 2022 Hi Trapti, yes, the horizontal scrolling stops at the last slide, that is correct. But the transition to horizontal scrolling follows directly. I would like to have a button placed in the green section. Only when you click on this button, you should be able to scroll into the gray section. Link to comment Share on other sites More sharing options...
Share Posted April 13, 2022 So you're saying that the user would see the scrollbar hasn't reached the end, they'd try to use their scrollwheel or drag the scrollbar and you want it to REFUSE to comply with the user's wishes until they click a button first? Personal opinion: that would drive me nuts as a user. This isn't really a GSAP-specific question. I mean you could in theory accomplish this, yes - there definitely isn't anything built into GSAP to accommodate that, other than ScrollSmoother does have a .paused() method that allows you to basically freeze the scrolling until you unpause it. 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