1

Is there a way to let users scroll free inside a slick slider without jumping back to an element?

At the moment I can only scroll from one slider item to the next. I want to allow scrolling like in a browser with the mouse or by dragging the elements.

I found the option swipeToSlide which allows users to drag or swipe directly to a slide irrespective of slidesToScroll.

That's nice but not a free scrolling with the mouse.

Is there any solution to to that?

Here's my current slick code:

$('.multiple-items').slick({
    infinite: true,
    swipeToSlide: true,
    slidesToShow: 3,
    slidesToScroll: 3
});

Working example

Cray
  • 5,307
  • 11
  • 70
  • 166

1 Answers1

1

I found myself in this question as i'm trying to achieve the exact same functionality as the one you describe.

I found a way to enable mouse wheell scrolling but NOT free scrolling. So when you rotate your mouse wheel up it goes to the next slide and when you rotate your mouse wheel down it goes to the previous slide.

The code for this functionality is the following:

$('.multiple-items').on('wheel', (function(e) {
    e.preventDefault();

    if (e.originalEvent.deltaY < 0) {
        $(this).slick('slickPrev');
    }else {
        $(this).slick('slickNext');
    }
}));

Have you managed to achieve the free scrolling?