Jump to content
Search Community

ScrollTrigger - Infinite Loop, starting back where you ended?

MadG test
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Not sure whether I'm actually going to do this but just curious how y'all would handle it. In the above pen I'm basically moving through 4 quadrants of a square on scroll, and that all works fine. Trying to figure out how I could make it infinite, but it seems like setting body to scroll position 0 doesn't work, unless I'm typing something wrong. Any thoughts? 

See the Pen eYeOxZJ by kslaton (@kslaton) on CodePen

Link to comment
Share on other sites

Hey @OSUblake, I dropped your onLeave and onLeaveBack handlers into my pen, and it's looping backwards but not forwards. Any thoughts on why? Edit: nevermind, I see it works when embedded in this window, it just must be something weird with the codepen window in my browser. Disregard!

 

 

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