Jump to content
Search Community

Hover runs for all elements

momo12 test
Moderator Tag

Go to solution Solved by Carl,

Recommended Posts

  • Solution

thanks for the simple demo.

my jQuery is a bit rusty, but I recall that hover would handle 2 functions for mouseenter and mouseleave.

The biggest issue is that you are creating a new timeline on every hover.

I don't really know what the end result is but usually it is best to create the timeline once for each element and then control it differently for each mouseevent. 

 

hopefully the following can get you going in the right direction.

 

See the Pen VwdQYRb?editors=0110 by snorkltv (@snorkltv) on CodePen

 

"play none none none" looks like toggle actions for ScrollTrigger and wouldn't apply at all here.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

3 minutes ago, Carl said:

thanks for the simple demo.

my jQuery is a bit rusty, but I recall that hover would handle 2 functions for mouseenter and mouseleave.

The biggest issue is that you are creating a new timeline on every hover.

I don't really know what the end result is but usually it is best to create the timeline once for each element and then control it differently for each mouseevent. 

 

hopefully the following can get you going in the right direction.

 

 

 

 

"play none none none" looks like toggle actions for ScrollTrigger and wouldn't apply at all here.

Thanks a lot for your answer and solution!!!

  • Thanks 1
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...