Jump to content


Simple Carousel

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



I'm kind of stumped with building a very simple carousel:



It runs perfectly if I don't use the left and right buttons it's just a mess.

Has anyone of you ever built some carousel like this and would be willing to share it?


Thanks so much,


Link to comment
Share on other sites

Hi Rob.


Yeah a timeline is not, in my opinion, the best way to achieve that. Chrysto created a very simple sample using mainly jQuery selectors and because of it's simplicity is a very solid starting point:


See the Pen LckBh by burnandbass (@burnandbass) on CodePen


You'll see that attaching button events to it won't be too hard.




  • Like 1
Link to comment
Share on other sites

Hi Rob,


As easy as it might seems, carousel is actually very tricky stuff. You can easily do very basic one, but most of the times this is not the case. You can have multiple items, slideshow, external navigation, pause on hover, responsive layout, iPhone/iPad bugs, etc... I personally prefer to create my own carousel for every single project, that implements ONLY the functionality I want - this keeps the code simple and optimised. If you have some specific question about creating a slideshow/carousel , or want to show you how to create specific type (ex with multiple items, only external navigation, how to create pause on hover, how to hide slideshow before all images loaded) I'll be glad to help :) 

  • Like 1
Link to comment
Share on other sites

Thanks, guys!

 think you're right, Rodrigo. I'll just go for single tweens instead of the timeline.

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.