Jump to content
Search Community

GSAP animation works only first time

JayShukla test
Moderator Tag

Recommended Posts

Hey Jay and welcome to the GreenSock forums. 

 

You're making a lot of the most common GSAP mistakes. I highly recommend giving it a thorough read :) 

 

What you should do instead is create your timeline outside of your event listeners and then just use control methods inside of the event listeners like so:

See the Pen KKgQNZM?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Also your event listeners should not be nested within one another.

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