I have pinned a div and as I scroll down I show some text using fromTo from TimelineMax. But when I scroll up the animation isn't repeated to show again the text but it shows the text from the x=-100 that i've set. Any ideas?
Not sure I see the exact issue but I rarely use the .to method of GSAP if I need it to reverse. I like to use .fromTo to make sure the values are always consistent.
I have pinned a div and as I scroll down I show some text using fromTo from TimelineMax. But when I scroll up the animation isn't repeated to show again the text but it shows the text from the x=-100 that i've set. Any ideas?
You can check the text animation here https://codepen.io/sotosbic/pen/VwYvoRV