Jump to content
GreenSock

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

killTweenTo Slider Help

Go to solution Solved by Diaco,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

New to gsap and js, trying to implement delayedCall in my slider like in the Bassta tutorial (http://bassta.bg/2013/05/simple-fade-infade-out-slideshow-with-tweenlite/). I am running into difficulty trying to killTweento when clicking on 'prev' or 'next'.

 

clearTimout seems to work from the original code (http://tympanus.net/codrops/2013/04/17/background-slideshow/); however, I would like to utilize gsap for this, so I can use sizzle or some other selector engine, instead of full-blown jquery.

 

(My attempt at killTweenTo is commented out in the code)

 

http://jsfiddle.net/gregorygarden/q68723x4/

 

 

See the Pen wBBqxB by anon (@anon) on CodePen

Link to comment
Share on other sites

  • Solution

Hi gregorygarden  :)

 

try this :

function startSlideshow() {
 TweenMax.killDelayedCallsTo(play);
 TweenMax.delayedCall(3.5, play);
}
function play(){
 navigate( 'next' );
 startSlideshow();
}

See the Pen Byywdp by MAW (@MAW) on CodePen

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