Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
keith101

Animate on mouseover still happens on mouseout

Recommended Posts

Hey guys, I have an issue where if i hover on and off the link too quickly the animation will still play (in this case scale:2). I'm guessing this is because the animation happens in 0.3s and if the mouse is off the link before then, then it will not detect the mouseLeave or mouseout function on the 'a' tag.

 

Question is: How do I stop the animation from happening once the user goes off the link if it happens before the 0.3s?

 

PS. I'm still new to GSAP, transitioning from DIY javascript so i'm still getting used to how things work.

Thanks

See the Pen XWXYVQy by KeithPaul (@KeithPaul) on CodePen

Share this post


Link to post
Share on other sites

Just add on both your #outer_circle tweens overwrite: true after scale, that should take care of it

  • Like 3
  • Thanks 1

Share this post


Link to post
Share on other sites

Works perfectly! Thanks a lot buddy, had me stumped for a while 🙃

  • Like 1

Share this post


Link to post
Share on other sites

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.

×