See this plugin: link
Implementation:
Insert the libraries below into your code. Download the files on the site above. Do not forget to include Jquery as well:
<script src="js/jquery.counterup.min.js"></script>
<script src="waypoints.min.js"></script>
Set the content type within the span tag:
<span class=".integers">12345</span>
<span class=".floats">123.45</span>
<span class=".numbers-with-commas">12,345.00</span>
Run the plugin, in the example below it was applied directly to any span tag:
<script>
jQuery(document).ready(function( $ ) {
$('span').counterUp({
delay: 10, // atraso de 10 ms
time: 1000 // velocidade do contador de 1000 ms
});
});
</script>