Jump to content
Search Community

Cannot execute collapse effect with dropdown menu when I add reverse function

JDK test
Moderator Tag

Recommended Posts

I'm using Vite + Vue to play with GSAP, I want to create a dropdown menu sidebar but I'm stucking at doing reverse animation to make the dropdown collapse. I tried to use this line blow and when I added the animation can not be triggered. How should I do for this situation?

 

tl.reversed() ? tl.play() : tl.reverse();

Here is my code on StackBlitz:

https://stackblitz.com/edit/vitejs-vite-jptdfr?file=src%2FApp.vue&terminal=dev

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.
×
×
  • Create New...