Owlcarousel2: Optionally replace pagination dots with numbers

Created on 25 Jul 2014  路  5Comments  路  Source: OwlCarousel2/OwlCarousel2

In the old owl carousel, there was an option to use numbers for the pagination, using the paginationNumbers parameter.

Can this option be added?

feature request

Most helpful comment

You could also use a CSS counter:

.owl-dots {
    counter-reset: dots;
}
.owl-dot:before {
    counter-increment:dots;
    content: counter(dots);
}

All 5 comments

Yes.

I wrote something for that yesterday.

jQuery('#tstpLightbox.twelvesteps').one('click', (function(){
var i = 1;
jQuery('.loop.twelvesteps .owl-dot').each(function(){
jQuery(this).append(i)
i++;
});
}));

You could also use a CSS counter:

.owl-dots {
    counter-reset: dots;
}
.owl-dot:before {
    counter-increment:dots;
    content: counter(dots);
}

using jquery add number of page to span
$('.owl-dot').each(function(){
$(this).children('span').text($(this).index()+1);
});

using jquery add number of page to span
$('.owl-dot').each(function(){
$(this).children('span').text($(this).index()+1);
});

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leighfarrell picture leighfarrell  路  3Comments

hemanthsp picture hemanthsp  路  3Comments

siwel picture siwel  路  3Comments

jhig85 picture jhig85  路  3Comments

shamimsaj picture shamimsaj  路  3Comments