Counter-Up is a jQuery plugin that animates a number from zero (counting up towards it). It supports counting up:
- integers
12345 - floats
0.1234 - formatted numbers
1,234,567.00
Features:
- Auto-detect for integers, floats or formatted numbers
- The plugin will also use the number of decimal places the original number is using.
- Lightweight: ~1kb
- Minimal setup
Requires waypoints.js
Include
<script src="proxy.php?url=http%3A%2F%2Fcdnjs.cloudflare.com%2Fajax%2Flibs%2Fwaypoints%2F2.0.3%2Fwaypoints.min.js"></script>
<script src="proxy.php?url=https%3A%2F%2Fgithub.com%2Fjquery.counterup.min.js"></script>
HTML
<span class="counter">1,234,567.00</span>
<span>$</span><span class="counter">1.99</span>
<span class="counter">12345</span>
jQuery
$('.counter').counterUp();
or with extra parameters
$('.counter').counterUp({
delay: 10,
time: 1000
});
delay - The delay in milliseconds per number count up
time - The total duration of the count up animation
Google+: +Benjamin Intal