Jump to content
Search Community

Infinite loop based on scroll direction

Nysh test
Moderator Tag

Recommended Posts

Hey guys, 

I'd like to achieve an infinite horizontal animation that changes direction (and speed) depending on whether the user scrolls up or down.

The animation currently changes with scroll, but eventually stops (see codepen). I know there are a few examples of infinite loops on the forum, however I wasn't able to combine them with a change in scroll direction. Any help on how to create an infinite loop with this example would be amazing :)


Cheers~

See the Pen LYRRydX by nish-mathur (@nish-mathur) 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...