mdelp Posted July 30, 2022 Share Posted July 30, 2022 Hi all, As I understand it from the docs, ScrollSmoother does not apply smooth scrolling to touch devices, but does apply the effects like data-lag and data-speed? Is there a way to disable these effects on touch devices too? Or is the best way to do this to just kill the scrollsmoother at a certain breakpoint? Link to comment Share on other sites More sharing options...
SteveS Posted July 30, 2022 Share Posted July 30, 2022 I would just kill it. In theory you could set the effect values for every element to 0 but I'm not sure what the side effects of doing so would be so I can't recommend it. Link to comment Share on other sites More sharing options...
Solution GreenSock Posted July 31, 2022 Solution Share Posted July 31, 2022 Yeah, you could skip the entire thing with something like this: if (ScrollTrigger.isTouch !== 1) { // only create if it's not a touch-only device... ScrollSmoother.create({...}); } Does that help? 2 2 Link to comment Share on other sites More sharing options...
mdelp Posted July 31, 2022 Author Share Posted July 31, 2022 Yea that should do the trick, unless you would advise against it and just keep it running on mobile too? Link to comment Share on other sites More sharing options...
GreenSock Posted August 1, 2022 Share Posted August 1, 2022 I see no reason to have it run on mobile unless you really need some of the effects. 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