Slick Slider - Rewind to first slide when reached the last

Viewed 1102

I want to make Slick carousel rewind to the first slide when it reaches the last slide, i searched for a solution but didn't find any.

Here is the JSFiddle for slick, i would like something like the rewind feature of Owl Carousel. I would use Owl carousel but Slick has some features that I need and Owl Carousel doesn't have. If anyone knows how to do this I'll be grateful

$(".slider").slick({
  slidesToShow:1,
});
.slider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider span {
  height: 200px;
  background: grey;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js"></script>
<section class="slider">
  <span>slide1</span>
  <span>slide2</span>
  <span>slide3</span>
</section>

1 Answers

According to this you can just take out {slidesToShow:1,} to make your slider call look like $(".slider").slick();

Also, it looks like your jsfiddle that you shared is working but your integrated code snippet demo doesn't have jquery on it. Maybe that's your real issue?

Related