Animated countdown/up

HTML
<span class="count">42</span>
CSS
body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #222; } .count { font-size: 20vmax; color: orange; }
JAVASCRIPT
$('.count').each(function () { $(this).prop('Counter',0).animate({ Counter: $(this).text() }, { duration: 4000, easing: 'swing', step: function (now) { $(this).text(Math.ceil(now)); } }); });
Expand for more options Login