Share Posted December 9, 2020 Hi all, I've got an issue with using a killTweensOf following by a fromTo method. Here is a codepen for explaining the issue The expected behavior here would be that the blue square fades from 0 to 1 each times I hover it. If I hover the blue square multiple times very quickly the animations plays as expected but at the end of the animation the opacity reverts to 0. If I don't use killTweensOfthe issue doesn't occure. Thanks, See the Pen eYddYzQ by manuelodelain-the-lessful (@manuelodelain-the-lessful) on CodePen Link to comment Share on other sites More sharing options...
Share Posted December 9, 2020 Hey Manu. You're making one of the most common GSAP mistakes. What you should instead do in situations like this is create the animation beforehand and use control methods to manipulate it inside of your event listeners. 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