Jump to content
GreenSock

berniewids

Problem navigating to labels and scrolling

Recommended Posts

Hi all,

 

I have created a timeline with some labels, when I created a nav links that when the link clicked, it will scroll to the selected label. I tried using tweenTo, which it's able to go to the selected label, but when i tried to scroll from the current position, it goes back to beginning, and not continue from the current position, is there a way to resolve this? The goal is, when i click on a link, the animate will scroll down/up to the selected label, then when I continue scrolling manually, it will continue from the current position, btw, I'm using GSAP 3, I tried to look search in docs and google for solution, but i cannot find any solution for it, i'm having problem interpreting the duration on the selected label with the scroll position.

 

Regards,

Ben

Link to comment
Share on other sites

Welcome to the forums, @berniewids

 

Unfortunately it's super difficult to troubleshoot blind - can you please provide a minimal demo? I wonder if you embedded your scrollTo tweens inside the timeline, thus they record the starting/ending values (as they should). If you want it to be more dynamic so that it animates from wherever it happens to be at that moment, just create a new tween each time (outside the timeline). 

 

Happy tweening!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×