Jump to content

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

Change direction of Carousel wrap example

Recommended Posts

Hi! I'm new to Greensock and I'm trying to get my head around how everything works.


I'm trying to change the direction of this codepen example - I've got as far as to change += to –= but I can't work out what I need to change on the modifier so that the boxes loop. Any help is much appreciated.

See the Pen QEdpLe by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

Hi @lsloss, have a look here to see "one way" it can be done. I say "one way" because I'm sure there are better methods than my ternary operator ... but I'm not feeling well today and it's all I can think of right now! ?


See the Pen OdGbow by sgorneau (@sgorneau) on CodePen


Hope this helps!

  • Like 4
Link to comment
Share on other sites

Amazing @Shaun Gorneau, thank you! Feeling unwell or not, it works perfectly and I really appreciate the time to comment what is happening too.

Hope you are feeling better!

  • Like 1
Link to comment
Share on other sites

nothing at all wrong with Shaun's approach. Check out the wrap() function discussed here:


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