JSFiddle - React, Tailwind, and code Playground

by DannyEnglander

HTML

<div class="owl-dots" style="">
  <div class="owl-dot"><span>foo </span></div>
  <div class="owl-dot"><span>foo </span></div>
</div>

CSS

html {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

*, *:before, *:after {
    -webkit-box-sizing: inherit;
    -moz-box-sizing: inherit;
    box-sizing: inherit;
}

.owl-dots {
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  width: 100%;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
  -ms-flex-pack: center;
  justify-content: center;
  margin-top: 40px;
}

.owl-dot span {
  display: inline-block;
  background-color: #ddd;
  width: 20px;
  -webkit-border-radius: 100%;
  border-radius: 100%;
  height: 20px;
  padding: 10px;
}

JavaScript

var counter = 1;

$('.owl-dot span').each(function() {
  $(this).html(counter);
  counter++;
});