Skip to content

Instantly share code, notes, and snippets.

@mihir1337
Forked from mdsalim/Owl Dots Numbering
Created September 4, 2018 07:46
Show Gist options
  • Select an option

  • Save mihir1337/07834c16f4318a035bb8df71d8671cd6 to your computer and use it in GitHub Desktop.

Select an option

Save mihir1337/07834c16f4318a035bb8df71d8671cd6 to your computer and use it in GitHub Desktop.
// way one
var i = 1;
$('.owl-carousel .owl-dot').each(function(){
$(this).text(i);
i++;
});
//way two
var dot = $('.slideWrap .owl-dot');
dot.each(function() {
var index = $(this).index() + 1;
if(index < 10){
$(this).html('0').append(index);
}else{
$(this).html(index);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment