five.design
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by five.design
-
-
This is gonna be easy for you, but I've tried for hours and I can't figure it out.
Here's what I've done so far:
- I've created a TimelineMax timeline and wrapped it in a function
- The function accepts two arguments – one specifying the clicked part of the page and one for the other half
- At a click event, the timeline starts to play with the desired animation depending on which side has been clicked
This works great, but I can't figure out how to reverse the whole thing. At the end of the animation, a "back button" appears and I want the timeline to animate backwards to the beginning (i.e. to the same view the visitors initially see) when the user clicks that button..
What code do I have to write on the lines 33 and 37 to achieve this?
Thank you very much in advance for your advice.
Patrick
See the Pen wVeWVQ by FiveDesign (@FiveDesign) on CodePen
Can't Figure Out How To Reverse Timeline
in GSAP
Posted
Thanks Mikel, but I don't really understand.
What do you mean by "(Note: <button> in html!)"?
Also, I don't want the two sides to switch when either back button is clicked, but rather go back to the initial state.
Could you please explain your code changes?
Thank you,
Patrick