Jump to content
Search Community

Timeline giving issue while pressing next button in slider faster then timedelay

Sandy Choudhary
Moderator Tag

Go to solution Solved by Rodrigo,

Recommended Posts

Sandy Choudhary
Posted

Hello Guys,

Hope you are doing great.

iam trying to create auto slider which will be work in both way auto slide as well controlled button. its working fine if  next button click after the time line complete but its giving issue when next button pressed  faster as compared to delay time given.


any help or suggestion will be very helpfull 

Thanks 

See the Pen yLmgpoq by Sandy-Choudhary (@Sandy-Choudhary) on CodePen.

  • Solution
Posted

Hi,

 

Maybe change this:

function animateSlide() {
  timer.restart(true);
  slideAnimation.kill();
  //...
}

To this:

function animateSlide() {
  timer.restart(true);
  slideAnimation.progress(1).kill();
  //...
}

Here is a fork of your demo:

See the Pen jOgypvy by GreenSock (@GreenSock) on CodePen.

 

Hopefully this helps

Happy Tweening!

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