Mitchsitoo Posted July 26, 2024 Posted July 26, 2024 I've been struggling with this code all day. I've tried everything to get the hover effect to work correctly with a .reverse() but this was the closest I could get to it working correctly. Apparently, it works fine when hovering and unhovering the mouse, but if I repeat these actions, the animation freezes or does weird things. How can I fix this, or is there a better way to do this hover animation? I'd appreciate any help. See the Pen mdZrZxQ by Jos-Mitchell (@Jos-Mitchell) on CodePen.
Solution mvaneijgen Posted July 26, 2024 Solution Posted July 26, 2024 What I would do is build one timeline and have that timeline.play() or timeline.reverse() on hover, that way you don't have tween that try to fight for control Check out this awesome tutorial by our own @Carl, it illustrates your problem exactly and even levels up the animation by adding distinct enter and leave animations.Hope it helps and happy tweening! 2
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