Masohas Posted June 8, 2022 Share Posted June 8, 2022 I have question, I wanted reverse animation "showMenuList"(this is pink background), but this not working, where is mistake? I tried many methods but I failed, pls help See the Pen KKQGgME by jarek-babiak (@jarek-babiak) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted June 8, 2022 Share Posted June 8, 2022 I noticed several problems: You keep re-creating the entire timeline/animation on every click. The playhead starts at 0, so if you call .reverse() and make the playhead go in the backward direction, nothing will happen because the playhead is ALREADY at the very start. You should create the timeline outside that method and just reuse the same one consistently. You set pause: true instead of paused: true on the timeline constructor You don't need to wrap things in css: {} anymore - that's a VERY old syntax from almost a decade ago you should update to the more modern syntax. See Is this what you were looking for?: See the Pen NWyOddg?editors=0010 by GreenSock (@GreenSock) on CodePen 1 1 Link to comment Share on other sites More sharing options...
Masohas Posted June 8, 2022 Author Share Posted June 8, 2022 @GreenSock thank you very much, you are greate What's the difference between pause: true and paused: true? Link to comment Share on other sites More sharing options...
GreenSock Posted June 8, 2022 Share Posted June 8, 2022 2 minutes ago, Masohas said: What's the difference between pause: true and paused: true? There's no such thing as "pause: true" 1 Link to comment Share on other sites More sharing options...
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