Created
September 12, 2018 10:31
-
-
Save Tsunamijaan/94390caf700c84b0b8f968d77a9d7ea1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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