Answer the question
In order to leave comments, you need to log in
How to catch the transfer of the active class?
<div class="owl-controls clickable">
<div class="owl-pagination">
<div class="owl-page"><span class=""></span></div>
<div class="owl-page"><span class=""></span></div>
<div class="owl-page active"><span class=""></span></div>
<div class="owl-page"><span class=""></span></div>
<div class="owl-page"><span class=""></span></div>
</div>
</div>
var owlPage = $(".owl-page");
$(function(){
$(".owl-page-altogether").html($(owlPage).length);
})
var owlPageIndexNumber = $('.owl-pagination .owl-page').index($('.owl-page.active')) + 1;
$(".owl-page-index-number").text(owlPageIndexNumber);
<p class="b-owl__navigation__el-count-mod-house">
<span class="owl-page-index-number"></span>/<span class="owl-page-altogether"></span>
</p>
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