JSFiddle - React, Tailwind, and code Playground

by Umair Rafiq

HTML

<div id="odometer" class="odometer">123</div>

CSS

</style><!-- This closes the open style tag above. Just a jsFiddle thing. Please ignore. -->


<!-- Odometr includes -->
<link rel="stylesheet" href="http://github.hubspot.com/odometer/themes/odometer-theme-car.css" />
<script src="http://github.hubspot.com/odometer/odometer.js"></script>

<!-- Extra styles for this example -->
<style>
.odometer {
    font-size: 100px;
}

JavaScript

setTimeout(function(){
    odometer.innerHTML = 456;
}, 1000);


setInterval(function(){
    odometer.innerHTML = 456 + odometer.innerHTML;
}, 1000);