Jump to content
Search Community

Draggable Auto-Slider, how to stop animation?

lalasalama test
Moderator Tag

Recommended Posts

Hi, I have a slide show animation similar to the one you posted on codepen with the draggable plugin. It works so far great. We'd like to know be able to stop the animation once the user is interacting with the site. Is that possible to achieve? 

 

Thanks for your help, 

 

kind regards
nina

See the Pen GRJwLNP by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

Hi @lalasalama and welcome to the GSAP Forums!

 

Thanks for being a Club GSAP member and supporting GSAP!

 

Sure thing just pause this GSAP delayed call instance and that should do the trick:

var timer = gsap.delayedCall(slideDelay, autoPlay);

Here you can find more info about delayedCall():

https://gsap.com/docs/v3/GSAP/gsap.delayedCall()

 

Here is a fork of that particular demo:

See the Pen bGZaybq by GreenSock (@GreenSock) on CodePen

 

Hopefully this helps.

Happy Tweening!

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