$('.test-card').each(function(){
/* Основной слайдер */
$(this).find('.test-main-slider__list').slick({
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
autoplay: true,
autoplaySpeed: 3000,
asNavFor: $(this).find('.test-second-slider__list'),
dots: true
});
/* Связанный слайдер */
$(this).find('.test-second-slider__list').slick({
infinite: true,
slidesToShow: 1,
slidesToScroll: 1,
arrows: false,
asNavFor: $(this).find('.test-main-slider__list'),
dots: true
});
});
let numSlick = 0;
$('.insert-gallery .main').each( function() {
numSlick += 1;
$(this).addClass(`gallery-main-${numSlick}`).slick({
asNavFor: `.gallery-slides-${numSlick}`,
infinite: false,
// autoplay: true,
slidesToShow: 1,
slidesToScroll: 1,
arrows: false
});
});
numSlick = 0;
$('.insert-gallery .controls #gallery-prev').each( function() {
numSlick += 1;
$(this).addClass(`gallery-prev-${numSlick}`);
});
numSlick = 0;
$('.insert-gallery .controls #gallery-next').each( function() {
numSlick += 1;
$(this).addClass(`gallery-next-${numSlick}`);
});
numSlick = 0;
$('.insert-gallery .all').each( function() {
numSlick += 1;
$(this).addClass(`gallery-slides-${numSlick}`).slick({
asNavFor: `.gallery-main-${numSlick}`,
infinite: false,
// autoplay: true,
slidesToShow: 4,
slidesToScroll: 1,
prevArrow: `.gallery-prev-${numSlick}`,
nextArrow: `.gallery-next-${numSlick}`
});
});