Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Guest struthyBhoy

hover - begin time line, out return to original

Go to solution Solved by Acccent,

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

Hi,

 

I am trying to get the animation to play back to its original position when the cursor leaves the button.

 

Thanks in advance.

See the Pen GZKrOj by anon (@anon) on CodePen

Link to comment
Share on other sites

Thanks Acccent - I will play about with that solution. Will prob take me a bit of time - I am no expert with javascript

Link to comment
Share on other sites

  • Solution

If you're having trouble, have a look at

See the Pen EKYWja by Acccent (@Acccent) on CodePen

, but I'd suggest trying to figure it out on your own first ;)

  • Like 2
Link to comment
Share on other sites

Thanks very much - I will give it half an hour on my own before cheating :)

 

Thanks again.

Link to comment
Share on other sites

I almost got there although I was missing the  

{paused:true} 

and the wipeAnimationHover bit of

wipeAnimationHover.to(".device-ipad.client-sssc", 0.7, {
 		 x: "-30%",
        ease:  Power4.easeOut,
    })

Thanks.

Link to comment
Share on other sites

You're welcome! Don't forget to mark the thread as answered if you don't have any other questions :)

Link to comment
Share on other sites

Hello struthyBhoy, and Welcome to the GreenSock Forums!

 

Just a quick observation guys.. When using the GSAP timeline, either TimelineMax or TimelineLite. You don't have to use the delay property on your tween since GSAP provides the position parameter

 

http://greensock.com/position-parameter

.to( target, duration, vars, position )

This way you get full control over your timeline sequence

 

 

:)

  • Like 2
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.
×