Will84 Posted August 30, 2022 Share Posted August 30, 2022 Hi Guys, I have problem my animations. When try use reverse for div with display:none the reverse doesn't work and show yourself again. And I have question, How execute all animations some time? I need button, change color, hide title and show description some time. Thanks! See the Pen MWVNZxV by willian-aquino (@willian-aquino) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted August 30, 2022 Share Posted August 30, 2022 Hi there! You've got an vue click handler here on your element, which is calling a function with an event listener inside it, so every time you click on that component you're creating a new timeline and a new event listener. Here's your demo in vanilla JS - working a ok. See the Pen xxWvBWr?editors=1010 by GreenSock (@GreenSock) on CodePen This thread should help you with vue 3 and storing a reference to a timeline to control on events Good luck, pop back if you need more help. 3 Link to comment Share on other sites More sharing options...
Will84 Posted August 31, 2022 Author Share Posted August 31, 2022 Hi Cassie, Thanks so much I will try here before, show you the result. Thanks again! Link to comment Share on other sites More sharing options...
Solution Will84 Posted August 31, 2022 Author Solution Share Posted August 31, 2022 Hi @Cassie it`s work!!!! Follow your example and vue post I understand. We need use Vue livecicle onMounted, I updated the code. See the Pen MWVNZxV by willian-aquino (@willian-aquino) on CodePen Thanks for help me!!! 2 Link to comment Share on other sites More sharing options...
Cassie Posted August 31, 2022 Share Posted August 31, 2022 Oh no worries! Glad that it's still onMounted in vue 3 - I was worried they'd switched it up and made it more like React ? Well done! 1 1 Link to comment Share on other sites More sharing options...
Rodrigo Posted August 31, 2022 Share Posted August 31, 2022 2 hours ago, Cassie said: I was worried they'd switched it up and made it more like React 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