Jump to content
Search Community

Another Hover Question

Aleccc test
Moderator Tag

Go to solution Solved by Carl,

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 guys,


Super new to js and gsap. I have two separate animations for mouseenter and mouseleave. If you hover over the target quickly (not allowing the hover to complete), the animation will not play correctly after the first hover. If you hover slowly and allow the both animations to completely finish on the first go, both animations will play correctly thereafter no matter how quickly the hover is triggered.


What I'm I missing here?




See the Pen KzZWqP by Aleccc (@Aleccc) on CodePen

Link to comment
Share on other sites

  • Solution

Hi and welcome to the GreenSock forums,


Thanks for the demo.


you had tweens in tlmodule1_2 overwriting tweens in tlmodule1


both timelines were controlling the x of module1. when you mouseout you told tlmodule1_2 to take over animating module which in turn killed the tween in tlmodule1. You could possibly put overwrite:"none" on the tweens in both timelines but for this case I think its just easier to create your tweens on the fly.


function blueover() {
    TweenLite.to(module1, 1, {
    "x": 90,
    "autoAlpha": 1,
    ease: Elastic.easeOut.config(1, 0.65),


  • Like 3
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...