Share Posted May 13, 2022 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 More sharing options...
Share Posted May 13, 2022 Maybe you're looking for observer instead? https://greensock.com/docs/v3/Plugins/Observer See the Pen XWzRraJ by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
Author Share Posted May 13, 2022 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 More sharing options...
Share Posted May 13, 2022 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 4 Link to comment Share on other sites More sharing options...
Share Posted May 13, 2022 That's a great demo, @Cassie thanks for posting it here! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now