JamesGrubb Posted August 27, 2020 Share Posted August 27, 2020 Hi I have animated mask triggered by a toggle. If the user click the toggle button repeatidly the animation does not have time to play through. Is there a way of resetting the animaion. and or reversing the animation on the second click. Thanks in advance See the Pen OJNmQNa by limitedunlimited (@limitedunlimited) on CodePen Link to comment Share on other sites More sharing options...
PointC Posted August 27, 2020 Share Posted August 27, 2020 You can .play(0) or .reverse(0) to start from the beginning or reverse from the end. You can also use the .isActive() method. https://greensock.com/docs/v3/GSAP/Tween/isActive() 3 Link to comment Share on other sites More sharing options...
JamesGrubb Posted August 27, 2020 Author Share Posted August 27, 2020 Thank you for pointing me in the right direction @PointC 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