Jump to content


Trying a variation of Slider to work with tweenMax first slide doesn't start

Recommended Posts

I've been trying to use this same principle as in this post, but with images inside an svg. but my first slide doesn't start for a smoe time... wel 15-20 seconds.  any help would be lovely. 

See the Pen BaLLxpP by davicoo (@davicoo) on CodePen

Link to comment
Share on other sites

That's because all your images are starting out at opacity: 1, so the top one on the stack is covering the ones that are correctly crossfading below. If you open Dev Tools you'll see that GSAP is doing what you're asking it to do - you just don't see it because the top image is obscuring the others. 


One fix would be to make all but the lowest one opacity: 0 to start: 

gsap.set(imgs.slice(1), {opacity: 0});

Happy tweening!

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

Additionally you're using a super old version of GSAP. We highly recommend upgrading the latest version of GSAP that has a smaller file size, a sleeker API, and a ton of new features! Upgrading it easy:


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