Answer the question
In order to leave comments, you need to log in
How to count the number of pages of owl corusel 2 slides?
var owl = $('.b-sale__action');
owl.owlCarousel({
items : 4,
slideBy: 4,
loop: true,
onInitialized: function(e) {
$('.counter-out').text('1 / ' + this.items().length)
console.log();
}
});
owl.on('changed.owl.carousel', function(e) {
$('.counter-out').text(++e.page.index + ' / ' + e.page.count)
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question