BHAVY J Posted July 26, 2024 Posted July 26, 2024 The panels can be scrolled manually or with button so when i scroll manually i update currentIndex(variable) so it sync properly with navigation button but now issue is when i navigate with button the scrolltrigger instance is not updated so when i navigate to panel-2 from panel-1 and try to scroll down it doesnt move. See the Pen GRbjbRd by bhavy123 (@bhavy123) on CodePen.
Solution mvaneijgen Posted July 26, 2024 Solution Posted July 26, 2024 Hi @BHAVY J welcome to the forum! Instead of animating the sections you're already animating with ScrollTrigger you want to update the scroll position of the page to reflect the point you want to scroll to. I've write a whole post about ways going about this. It involves the ScrollToPlugin and especially check the second comment it has some really nice helper functions! Hope it helps and happy tweening! 3
BHAVY J Posted July 29, 2024 Author Posted July 29, 2024 Thanks @mvaneijgen for replay. This was really helpful. now I got the clear understanding.
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