Jump to content
Search Community

Tween will not stop and run multiple on hover

wrongholt test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello again.  I have like it is on the Codepen except with my code it will scale multiple pictures at the same time even when I am not hovering on them.  On the code pen I couldn't get it to work like it does in my code.  Any suggestions?  Let me know if you need anything else I can post my code but it is identical to the Codepen.  Thank you.

See the Pen jLmYxZ by wrongholt (@wrongholt) on CodePen

Link to comment
Share on other sites

Sorry, I'm confused. This pen is or is not demonstrating the problem?

 

If multiple elements are animating when hovering over one, it sounds like a selector problem. Could you give some more details about what's happening that shouldn't be happening or vice versa?

 

Thanks.

:)

Link to comment
Share on other sites

I can understand that it is confusing but I can't demonstrate it with codepen.  So I have 4 photos in a diagnal direction with overlap like on the codepen and when I hover over it like on the codepen the scaling to 2.0 will happen on multiple photos.  It works properly on codepen sorry let me know if this explains it any better?

Link to comment
Share on other sites

If all the elements are animating on hover, it sounds like the target of the tween is an entire array rather than 'this'. 

 

If the CodePen works correctly and the local version of your project does not, there must be some difference. If you can get the demo to show the problem, we can probably point you in the right direction. 

 

Thanks.

  • Like 4
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.
×
×
  • Create New...