0

I'm using Locomotive scroll library to animate gallery view horizontaly on scroll. Problem is mobile view.

See the demo: DEMO

 const lscroll = new LocomotiveScroll({
    el: document.querySelector("[data-scroll-container]"),
    smooth: true,
    direction: "horizontal"
  });

See the code: CODE

Hastalavistababyml
  • 1,078
  • 1
  • 9
  • 15

1 Answers1

0

You can set breakpoint values (min width for the locomotive scroll to take effect) to 0.

const lscroll = new LocomotiveScroll({
    el: document.querySelector("[data-scroll-container]"),
    smooth: true,
    direction: "horizontal",
    mobile: {
      breakpoint: 0,
      smooth: true,
      direction: "horizontal",
    },
    tablet: {
      breakpoint: 0,
      smooth: true,
      direction: "horizontal"
    },
});