The "initialSlide" functionality breaks the slider if
Then it will not be possible anymore to drag the slides (the slider immediately returns to its initial position) and "next" and "prev" links are not working either.
see:
I have the same problem. Maybe somebody have some workaround solution for it ?
Don't use slick for your projects, is the workaround.
You can handle the situation yourself, just ensure that you don't exceed the limit:
initialSlide = initialSlide > numberOfSlides - slidesToShow
? numberOfSlides - slidesToShow
: initialSlide;
Ok, thanks. Already did something similar, but just used slickGoTo instead of initialSlide, like:
initialSlide = initialSlide > numberOfSlides - slidesToShow
? initialSlide - (slidesToShow - 1)
: initialSlide
$('.slider).slick('slickGoTo', initialSlide, true );
and active slide visible and slider still works ok.
Most helpful comment
Don't use slick for your projects, is the workaround.