kf420 Posted May 28, 2022 Share Posted May 28, 2022 Looking for guidance on how to add previous/next navigation to a horizontally scrolling container, like the one in the attached Codepen. I found several examples with multiple links - one for each section within container, but I am looking specifically for previous/next only. In other words, some way to determine which section is in view (with snap enabled), and ability to navigate to next or previous if available, or disabling the button if not. See the Pen WNjaxKp by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
GSAP Helper Posted May 28, 2022 Share Posted May 28, 2022 This may help: See the Pen xxEQNBB by GreenSock (@GreenSock) on CodePen And this helper function may also be useful: https://greensock.com/docs/v3/HelperFunctions#getScrollLookup We love helping with GSAP-related questions, but unfortunately we just don't have the resources to provide free general consulting or "here are my list of requirements...please show me how to build it" tutorials. Of course anyone else is welcome to post an answer if they'd like - we just want to manage expectations. You can post in the "Jobs & Freelance" forum for paid consulting, or contact us directly. Or you can take a crack at a solution and if you get stuck, just post back here with a minimal demo showing only the issue you're stuck on (not your whole project) and we'd be glad to take a peek. 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