kenwheeler / slick

the last carousel you'll ever need
kenwheeler.github.io/slick
MIT License
28.33k stars 5.88k forks source link

When last slide has 1 item and slidesToShow is greater than slidesToScroll then slide is not working at last on click of arrows #4272

Closed dev-ramchander closed 10 months ago

dev-ramchander commented 10 months ago

I have total of 9 slides and I would like to scroll 4 items on click of arrows. Slides to show should be 5. When you execute below code, you see on last slide when we click on arrow it's not scrolling

(function () {
  $(".carousel").slick({
    infinite: true,
    dots: true,
    slidesToShow: 5,
    slidesToScroll: 4,
    arrows: true,
    nextArrow: '<button type="button" class="slick-next">Next</button>',
    prevArrow: '<button type="button" class="slick-prev">Previous</button>'
  });
})();

==================================================================== jsfiddle link here https://jsfiddle.net/qdr80syb/