Jump to content
Search Community

scrollTrigger - item scroll horizontally

Jacky Yang test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

I have a section('.sec-3'), I pin it to fixed in view, and it has 3 items('.scroll-trigger-item') to scroll  horizontally when scrolling. I loop the items array but just one item works (the first item). Please help me to fix code to make other items work except the last item(make the last item stop in view's center), thanks!

See the Pen rNvBKgE?editors=1000 by jackyyang (@jackyyang) on CodePen

Link to comment
Share on other sites

I misunderstand the demo😅. I thought when scrolling to the section and keep scrolling , the item will scroll automatically to the left(like my demo), definitely it's not works as I thought. I'm sorry about that, the demo works just fine and great!🤩

By the way, there's another question about my demo. As the item height is short, is there any solution to make it looks "natural"?  I want the pined section('.sec-3') looks like pinning in view, until  scroll to the end of  '.scroll-trigger'. Now, it looks like '.sec-3' is moving down. Thanks!

See the Pen GRdRpwG?editors=1010 by jackyyang (@jackyyang) 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...