Share Posted May 20 I have smooth scroll configured to my project but the scroll gets laggy on mobile devices if normalizeScroll is set to true so I was wondering if there's a way to switch it to false if user is on a mobile device. I tried this and it changes the boolean but the normalizeScroll wont switch conditionally. if(window.innerWidth < 960) { this.normalizeScroll = false } else { this.normalizeScroll = true } this.$scrollSmoother.refresh() Here's a codesandbox with the same setup I have in my project: https://codesandbox.io/s/gifted-sea-6rybt5?file=/layouts/default.vue Link to comment Share on other sites More sharing options...
Share Posted May 20 Hey there Nicolas, You can use media queries like so. Good luck with your project! See the Pen GRQENyo by GreenSock (@GreenSock) on CodePen 2 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