Streaming live at 10am (PST)

Luxy.js - How do I disable smooth scroll on handhelds?

Hey guys,

I need your help with some custom code. I am using CJ Hersh’s webflow clone of the ‘Luxy.js’ smooth scrolling project. It’s working great but one thing that I’m having an issue with is trying to find a javascript snippet that makes it so it doesn’t run Luxy.js on hand held devices.

I have found a few clues over at stackoverflow with these snippets, but alas no luck with disabling the scrolling effect on hand held devices.

Any help is greatly appreciated! Please find below the read-only for the webflow project, and the published link.


Here is my site Read-Only:
https://preview.webflow.com/preview/luxy-free-mobile?utm_medium=preview_link&utm_source=designer&utm_content=luxy-free-mobile&preview=6a01fa6fcd36205232004d675e3948d9&mode=preview&fbclid=IwAR0OsZW9SwzcZl8RC7ArXHyKeJYfls8eP7ffXVPo1VhZrnNbCCXF2olDfVA

Published:
https://luxy-free-mobile.webflow.io/

1 Like

I’m curious about this too, following. Where would you paste the code below into? I’ve treid pasting that into and it doesn’t seem to work on the published site.

Clone the page here: https://webflow.com/website/luxy-free-mobile

if (window.screen.width > 780) {
  document.write( 
    '<script src="https://cjh.sfo2.cdn.digitaloceanspaces.com/Smooth-Scroll/luxy.js"><\/script>'
  )
}
1 Like