JSFiddle - React, Tailwind, and code Playground
by Reigel Gallarde
HTML
<div><span class="count">200</span></div>
<div><span class="count">1000</span></div>
<div><span class="count">853</span></div>
<div><span class="count">154</span></div>
<div><span class="count">10</span></div>
<div><span class="count">87</span></div>
<div></div>
<div><span class="count">1421</span></div>
<div><span class="count">145</span></div>
<div><span class="count">78</span></div>
JavaScript
$('.count').each(function () {
$(this).prop('Counter',0).animate({
Counter: $(this).text()
}, {
duration: 4000,
easing: 'swing',
step: function (now) {
$(this).text(Math.ceil(now));
}
});
});