Jump to content
Search Community

Banner auto carousel

moorthi test
Moderator Tag

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

hi and welcome to the GreenSock forums,

 

First, that's a really nice carousel. Great job!

 

I can't go in and spend a lot of time figuring out how to make everything work. 

In simplest terms you just need a function to navigate to the next slide at a certain interval.

 

I was able to get it running by adding:

 

function auto(){
    activeID++;
    navigateSlide();
    TweenLite.delayedCall(0.5, auto)
  }
  //
  auto();

http://codepen.io/GreenSock/pen/WQRVGP?editors=101

 

You are probably going to want to de-activate the automated advancement every time a user clicks on a dot or arrow.

 

You can use TweenLite.killTweensOf(auto) to do that

 

http://greensock.com/docs/#/HTML5/GSAP/TweenLite/killTweensOf/

 

 

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