Счетчик начинает считать слайдеры с 0 , как можно сделать подсчет с 1 слайдера ?
$(function(){
var owl = $('.Contentslider .owl-carousel');
owl.owlCarousel({
loop:true,
autoplay: false,
items:1,
nav: true,
dots: true,
navText: ['◄','►'],
startPosition: 1,
onInitialized : counter, //When the plugin has initialized.
onTranslated : counter //When the translation of the stage has finished.
});
function counter(event) {
var element = event.target; // DOM element, in this example .owl-carousel
var items = event.item.count; // Number of items
var item = event.page.index + 1; // Position of the current item
$('.counter').html(""+item+" / "+items)
}
});
и возможно для item добавить класс ?
$('.counter').html(""+item+" / "+items)
Сейчас выводится счетчик вот так - 0 / 2 , надо 2 / 2