Jump to content
Search Community

Hover animations problems

Mitchsitoo

Go to solution Solved by mvaneijgen,

Recommended Posts

Posted

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
Posted

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! 

 

 

  • Like 2

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...