Jump to content
Search Community

Tweaking GSAP slider

LukeNick 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,

 

after having followed the forum, checking many examples and watching some tutorials, I have started playing with GSAP and so far it has been really fun. Now I have used Jonathan's example of the slider with controls (this one: 

See the Pen qqmBjQ by jonathan (@jonathan) on CodePen

). It worked quite well, but now I am stuck on two things. So I thought now would be a good opportunity to start posting in the forum :-)

 

Is it possible to have autoplay just run once and stop at the last frame? And how could I add digits that let me navigate to each slide and show which slide is active? 

 

Here is my example: 

 

For the autoplay I tried: 

function loopCheck() {
     $currentSlide++;
     if ($currentSlide < 2) {
  TweenLite.killDelayedCallsTo(play);
     } 
 
But this does nothing. 

 

If anyone could point me in the right direction, I would really appreciate it. 

 

Cheers,

 

Lucas

 

 

See the Pen peLreK by lukenicktap (@lukenicktap) on CodePen

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