var $examplesSlider2 = $('.reviews-slider');
var examplesSlider2 = $examplesSlider2[0];
var $paging2 = $('.reviews-slider-paging .paging');
$examplesSlider2.slick({
slidesToShow: 1,
adaptiveHeight: true,
swipe: true,
infinite: false,
appendArrows: '.reviews-slider-paging',
prevArrow: '<button class="slick-arrow slick-prev"></button>',
nextArrow: '<button class="slick-arrow slick-next"></button>',
}).on('init reInit afterChange', function (event, slick, currentSlide, nextSlide) {
if (!event.target.classList.value.includes('reviews-slider')) {
return;
}
var i = (currentSlide ? currentSlide : 0) + 1;
if(i > 9) {
$paging2.html(i + '<span class="slick-devider"></span>' + '<span class="sr">' + slick.slideCount + '</span>');
} else {
$paging2.html('0'+i + '<span class="slick-devider"></span>' + '<span class="sr">' + slick.slideCount + '</span>');
}
});
$('.reviews-gallery-slider').on('mousedown touchmove', function(){
examplesSlider2.slick.setOption({
swipe: false,
touchMove: false,
});
});
$('.reviews-gallery-slider').slick({
slidesToShow: 3,
adaptiveHeight: true,
infinite: false,
swipe: true,
prevArrow: '<button class="slick-arrow slick-prev"></button>',
nextArrow: '<button class="slick-arrow slick-next"></button>',
responsive: [
{
breakpoint: 640,
settings: {
slidesToShow: 2,
}
},
{
breakpoint: 479,
settings: {
slidesToShow: 1,
}
}
]
}).on('afterChange', function(event, slick){
event.stopPropagation();
examplesSlider2.slick.setOption({
swipe: true,
touchMove: true,
});
});
$examplesSlider2.slick({
slidesToShow: 1,
adaptiveHeight: true,
swipe: true,
infinite: false,
appendArrows: '.reviews-slider-paging',
prevArrow: '<button class="slick-arrow slick-prev"><img src="img/arrow.svg" alt="" /></button>',
nextArrow: '<button class="slick-arrow slick-next"><img src="img/arrow.svg" alt="" /></button>',
}).on('init reInit afterChange', function (event, slick, currentSlide, nextSlide) {
if (!event.target.classList.value.includes('reviews-slider')) {
return;
}
var i = (currentSlide ? currentSlide : 0) + 1;
if(i > 9) {
$paging2.html(i + '<span class="slick-devider"></span>' + '<span class="sr">' + slick.slideCount + '</span>');
} else {
$paging2.html('0'+i + '<span class="slick-devider"></span>' + '<span class="sr">' + slick.slideCount + '</span>');
}
});