Recently I have added Slick carousel on my project.
Reading there document i have seen there is a method slick Prev()
and slick Next()
.
But I am asking you how do I use this method. I have try this long time but I actually I can't understand how to use this with html button
.
$('button.next').click(function() {
$(this).slickPrev();
});
I have tried this way.
Mine is same as above but maybe a little different, and I think is better to understand:
$('.responsive').slick({
dots: true,
prevArrow: $('.prev'),
nextArrow: $('.next'),
infinite: false,
speed: 300,
slidesToShow: 3,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 5000,
});
<div class="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
</div>
<div class="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
</div>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With