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