Jump to content
Search Community

Recommended Posts

Posted

Hello I'm new to GSAP animation. I add animation with jQuery it's working for the first time if you click on the " Green button " in the top right corner. I need to make the animation reverse also but when it's complete animation does not work second time. Please help Thanks.

See the Pen poEabBx by henrymanektech (@henrymanektech) on CodePen.

Posted

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
Posted

Thank you. I'll definitely check it.

Posted

You also need to try connecting cssplugin. You can also use TweenMax instead of TweenLite, which already includes it. Maybe this solution will help you.

Posted

@lahisir No, he's using GSAP 3. GSAP 3 has CSSPlugin baked into the core by default. There is no Lite/Max flavors of GSAP 3.

  • Like 1

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