gsapnooby Posted February 14, 2023 Share Posted February 14, 2023 The animation as you see happens where center section A expands and shows three nav indicators on the right. This section contains three sub-sections A1, A2 and A3 vertically stacked. How do I make the nav indicators clickable and navigate to a particular slide inside the section A. When click on Nav A1 ---shows--> slide A1, Nav A2--> shows--> Slide A2 and Nav A3 -- shows --> Slide A. See the Pen VwGwdGa by yumelabs (@yumelabs) on CodePen Link to comment Share on other sites More sharing options...
mvaneijgen Posted February 15, 2023 Share Posted February 15, 2023 You can create one big timeline and add labels to that timeline: https://greensock.com/docs/v3/GSAP/Timeline/addLabel() and then use the .tweenTo() function to animate to those labels in the timeline: https://greensock.com/docs/v3/GSAP/Timeline/tweenTo() You will probably need to make two timelines, one for ScrollTrigger and the other for the click interaction and keep in mind that the ScrollTrigger timeline probably doesn't know where the click timeline left off, so that will need some fixing if you scroll backwards while having clicked. 1 Link to comment Share on other sites More sharing options...
Ezra Siton Posted February 15, 2023 Share Posted February 15, 2023 A1, A2, A3 looks like normal slider / or "tabs" (No related to GSAP). The best idea is to use swiper -or- splide (Very easy to bind custom navbar to slides by `slideTo(index)` idea). To control the show of A1 to A2 to A3 by GSAP - you could add some scroll animation related to this sections (And than use labels or scrollTo). The idea +-: See the Pen bGVjLwG by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
GreenSock Posted February 16, 2023 Share Posted February 16, 2023 Yeah, it really depends on exactly what effect you're going for, like if you want native scroll to reveal each section or if you just want users to be able to click on those smaller nav <div> elements to get there, etc. Pretty much anything is possible...it's just a matter of wiring up all the custom functionality and logic. It's not really something we can build out for you for free here in these forums, but we do offer paid consulting services so feel free to reach out to us if you'd like to pursue that. Good luck with the project, @newusergsap 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