Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
noriko_gsap

The animation order is out of order on slider.

Recommended Posts

Hello there,
I made a slide animation using gsap.
However, pressing the button may cause the animations to be out of order.
I cant find the cause....
If there is a way how can I fixed this problem?

See the Pen vYGbXav by nono_gsap (@nono_gsap) on CodePen

Link to post
Share on other sites

Hey noriko and welcome to the GreenSock forums. 

 

We don't have the capacity to debut your whole slider but glancing at the code I think the issue might be with your isTweening function. I wouldn't use the .isTweening() method to determine whether or not an animation is running. I'd use the .isActive() method on the actual animation itself. 

 

Side note, you should use xPercent: -100 instead of x: "-100%". See the most common GSAP mistakes article to learn more about the other common GSAP mistakes.

Link to post
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.

×