JSFiddle - React, Tailwind, and code Playground
HTML
<div id="odometer" class="odometer">0</div>
CSS
</style>
<!-- Odometr includes -->
<link rel="stylesheet" href="http://github.hubspot.com/odometer/themes/odometer-theme-default.css" />
<script src="http://github.hubspot.com/odometer/odometer.js"></script>
<!-- Extra styles for this example -->
<style>
.odometer {
color: #FF8000;
font-size: 100px;
cursor: pointer;
}
JavaScript
var odometer = document.querySelector('.odometer');
window.odometerOptions = {
format: '(ddd),dd',
duration: 1000
};
var num="16.2";
setTimeout(function(){
odometer.innerHTML = num;
}, 1000);