How can I show the decimal value of only one counter only? Currently its rounding up the 4.7 to 5
$('.count').each(function() {
$(this).prop('Counter', 0).animate({
Counter: jQuery(this).text()
}, {
duration: 4000,
easing: 'swing',
step: function(now) {
$(this).text(Math.ceil(now));
}
});
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="shiva"><span class="count">200</span></div>
<div id="shiva"><span class="count" id="reducedaily">4.7</span></div>