A jQuery plugin to easily animate numbers.
http://garethdn.github.io/jquery-numerator/
Include script after the jQuery library:
<script type="text/javascript" src="/path/to/jquery-numerator.js"></script>
$('.my-value').numerator( options )
An optional parameter to specify the animation easing. Defaults to swing.
easing: 'linear'
An optional parameter specifying the length of the animation in milliseconds (ms). Defaults to 500 (1/2 a second).
duration: 2000
An optional parameter specifying character(s) used to delimit thousands values.
delimiter: ','
This parameter specifies the number of decimal points to display. Defaults to 0.
rounding: 2
The final value that you want the number to be animated to.
toValue: 205
A function to be called when the animation beings.
onStart: function(){
alert('Animation started')
}
A function to be called at each step of the animation. Accepts two arguments, now and fx.
onStep: function(now, fx){
alert('The current value is: ' + now)
}
A function to be called when the animation is complete.
onComplete: function(){
alert('The animation is now complete')
}
- Implement queue functionality
Publish bower packagePublish NPM package
MIT License (c) Gareth Nolan