Jump to content
Search Community

On-Off-onclick same element

dominium 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 Guys,

 

I know that should be easy for you to resolve that.

 

I have tried a lot and I'm getting better and better having fun learning GSAP

 

I want to animate the same element for mouseover, mouseout and click.  The click state as you probably already know is the difficult part.

 

I tried some playback method with kill...etc..

 

The "on" state is play and reverse on "off" but I dont' get what to use to kill and play another tween for same object.

 

I am using the scrollto plugins.

 

BAsically My overlay is autoalpha 1 onmouseover and 0 onmouseout but if the user click it should stay visible for 1 second which is the same time for the scrollto finish

 

 

Viva codepen to describe it

 

Thanks

 

Danny

 

 

 

See the Pen aLooBM by dominium (@dominium) on CodePen

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...