Jump to content
GreenSock

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

Scaling Triggers on Mouseovers

Recommended Posts

@ZachSaucier

 

Hi, 

 

Thank you for the tip! I managed to make the image scale while hovering over text. What I'm trying to accomplish is to hover over text OR image, and the image will scale. I managed to do that, but when the mouse moves from image to text or text to image, the scaling animation is choppy during that transition. Is there a way to smooth that out, or pause the animation while the mouse moves in between elements?

See the Pen YzyPMgR by PlusUltra (@PlusUltra) on CodePen

Link to comment
Share on other sites

I would recommend making one timeline instead of two that will compete for control of the element(s). Then add a listener to the img and the h2 that will play/reverse the one main timeline.

 

Since these elements are both children of the trigger element, couldn't you just add one listener to the parent trigger div?

  • Like 2
Link to comment
Share on other sites

@PointC Hi,

 

I never even thought of that! Thank you for your help, it worked!

Link to comment
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.
×