locomotivemtl / locomotive-scroll

🛤 Detection of elements in viewport & smooth scrolling with parallax.
https://locomotivemtl.github.io/locomotive-scroll
MIT License
7.97k stars 1.12k forks source link

Scroll effect not working on smartphone and touch screen #569

Open dewebkiller opened 1 month ago

dewebkiller commented 1 month ago

Hello 👋

The scroll effect does not work on the smartphone and also in the touch screen device even if it is a laptop and other devices. I have tried multiple options adding the codes like this: const scroll = new LocomotiveScroll({ el: document.querySelector('[data-scroll-container]'), smooth: true, smartphone: { smooth: true }, tablet: { smooth: true } });

// this also: const scroll = new LocomotiveScroll({ el: document.querySelector('[data-scroll-container]'), smooth: true, smartphone: { smooth: true, direction: "vertical" //use the direction according to your need// }, tablet: { smooth: true, direction: "vertical" //use the direction according to your need// }, });

const scroll = new LocomotiveScroll({ el: document.querySelector('[data-scroll-container]'), smooth: true, smartphone: { breakpoint: 0, smooth: true, direction: "horizontal", }, tablet: { breakpoint: 0, smooth: true, direction: "horizontal" }, }); But none of the code works.

Thank you 👊