Jump to content
Search Community

Finish an animation men timeline

kmytor test
Moderator Tag

Recommended Posts

I would like that by clicking alternate or quick clicks the animation of this event on the timeline will not be damaged,
What I mean is if I quickly click on the buttons to change the image galleries do not get damaged

Is there any way to tell it when show animation ends show hide animation?

 

I am not very expert and I am in daily learning

 

Thank you!

See the Pen XWmgyeo by kmytor (@kmytor) on CodePen

Link to comment
Share on other sites

Hey kmytor. The best thing to do in this situation is to setup a timeline outside of your event listener functions and then use control methods to control that timeline inside of the event listener functions. Here's how I'd set it up:

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

 

For more about this and a bunch of other helpful tips, I highly recommend my article on animating efficiently.

 

Let me know if you have any questions!

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