Jump to content
Search Community

Stop scrolling through all sections

fd_alistair test
Moderator Tag

Recommended Posts

Hi there, we're using scrolltrigger to move though sections, within those sections there are multiple text boxes that are animated in.

 

We're trying to get this work on a touch-screen device so the user cannot scroll automatically from the first to last section with a quick swipe....is there anyway of restricting this?

 

Any help would be appreciated

See the Pen ZErpdQL by fuzzyduck (@fuzzyduck) on CodePen

Link to comment
Share on other sites

56 minutes ago, Cassie said:

Maybe you're looking for observer instead?
 

https://greensock.com/docs/v3/Plugins/Observer

 

 

 

 

 

Ok thanks for getting back to me, looks very interesting.

Looking at the documentation I can't see a way to stop the looping from top to bottom, is that possible?

Also, is it possible to keep the multiple text animations within the sections, before moving on to the next section?

Link to comment
Share on other sites

1 hour ago, fd_alistair said:

Looking at the documentation I can't see a way to stop the looping from top to bottom, is that possible?

 

Yes certainly - you can do whatever you want! Observer is just handling the events for you. What you choose to do on those events is up to you. You will have to write that logic yourself.

 

Here's an example of mixing together Scrolltrigger and Observer

See the Pen 1ccf60146d680c09ba6074bf9132778d?editors=0011 by GreenSock (@GreenSock) on CodePen

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