animationCounter.js is a jQuery plugin that animates a number from a value to another or to infinite value
1.1. Download the latest version from GitHub
bower install animationCounter.js
<script src="animationCounter.js" type="text/javascript">
In your JS file, call the animationCounter() function with default parameters
$('yourdiv').animationCounter();
Or call animationCounter() function with your parameters like this the following example :
$('#yourdiv').animationCounter({
start: 0,
end: 500,
step: 1,
delay: 1000,
txt: ' €'
});
Parameters | Type | Definition | Default |
---|---|---|---|
start |
integer | The value where the counter started | 0 |
end |
integer | The value where the counter stopped | null |
step |
integer | The interval between the values | 1 |
delay |
integer | The intervals (in milliseconds) on how often to execute the code | 1000 |
txt |
string | The text displayed after your counter | '' |
You can see how it's works on the demo page
Copyright © Micheline Pavadé
This project is released under the MIT License.