There is a carousel which consists of cards in the form of carousels. When you click on a small picture, the numbers near the arrows change. How to avoid it? http://prntscr.com/lypjep you need the numbers to change only when you scroll through the big carousel.
this is the carousel code
let cou;
let n;
$('.like-carousel')
.on('init afterChange', function (event, slick, currentSlide, nextSlide) {
var i = (currentSlide ? currentSlide : 0) + 1,
container_slider = $(this).closest('.like-container'),
$status = container_slider.find('.slider-count');
cou = slick.slideCount;
n = i;
var c =slick.slideCount<=9?'0'+slick.slideCount:slick.slideCount;
i = i<=9?'0'+i:i;
$status.text() ? $status.children(".current").text(i) : $status.append('' + i + '' + '/' + ''+c+'');
})
.slick({
slidesToShow: 5,
slidesToScroll: 1,
focusOnSelect: false,
arrows: true,
accessibility: false,
responsive: [
{
breakpoint: 1450,
settings: {
slidesToShow: 4
}
},{
breakpoint: 1040,
settings: {
slidesToShow: 3
}
},{
breakpoint: 700,
settings: {
slidesToShow: 2
}
},{
breakpoint: 580,
settings: {
slidesToShow: 2,
arrows: false,
dots:true
}
}
]
});
This is the code of the card in the carousel
var numSlick = 0;
$('.promo-gallery').each( function() {
numSlick++;
There is a carousel which consists of cards in the form of carousels. When you click on a small picture, the numbers near the arrows change. How to avoid it? http://prntscr.com/lypjep you need the numbers to change only when you scroll through the big carousel.
This is the code of the card in the carousel var numSlick = 0; $('.promo-gallery').each( function() { numSlick++;
});
numSlick = 0; $('.promo-gallery-p').each( function() { numSlick++;
});