samlinck Posted March 4, 2020 Share Posted March 4, 2020 Hi I'm very new to gsap and I was trying to make a hover animation for my buttons. But I would like the button to return to his start position. I tried to use clearProps, but that doesn't seem to do the trick. Hope someone can help! See the Pen abOygZB by Samlinck (@Samlinck) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted March 4, 2020 Share Posted March 4, 2020 Hey samlinck and welcome to the GreenSock forums! Thanks for the minimal demo, it's very clear. The reason why clearProps is not working is because you're adding it to the timeline. Since the timeline is paused, that set call is not reached until later (when it's unpaused). To get it working, use just gsap.set() instead Alternatively, you could not clear anything but instead use .pause(0). 1 Link to comment Share on other sites More sharing options...
samlinck Posted March 4, 2020 Author Share Posted March 4, 2020 Okay that was easy ?. Thanks! 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