Share Posted January 10, 2019 I have a Dropdown Navigation with sub-menu-points that are revealed on click. For this I created a timeline with 2 tweens: A tween that changes the height and opacity of the next menu points A tween that animates the menu points from left to right. The forward animation works fine but the reverse function only reverses the second tween — however without any animation. The first tween isn't reversed at all. Any idea on what I did wrong? Thanks so much. See the Pen VqGROw by rob83 (@rob83) on CodePen Link to post Share on other sites
Share Posted January 10, 2019 Hi and welcome to the GreenSock forums. Thanks for the demo. The biggest problem is that you create a new timeline on every click. Please see the console logs in this demo: See the Pen gZdVbL?editors=0011 by GreenSock (@GreenSock) on CodePen If the menu is already open, there is no need for a new timeline. You really want to reverse the timeline that was created on the previous click, not one that was just made. There are a few ways to go about this, but your end result needs to be that each menu has a reference to its own animation that it is in charge of playing or reversing. Probably the best approach to this setup is what @OSUblake does in this thread This version from @pointC may be a little easier to understand (you would have to change the interaction to be click-based of course) See the Pen yJqQqj by PointC (@PointC) on CodePen and a similar approach See the Pen WxgdRz by GreenSock (@GreenSock) on CodePen 4 Link to post Share on other sites
Author Share Posted January 11, 2019 This was the hint I needed. Thanks so much, Carl! 1 Link to post Share on other sites