Light weight jQuery Plugin for counting up
The number in the HTML-Elemnt have to stay alone without any unit. Apply the CoutUpCircle Plugin with the following JavaScript Code:
$('element').CountUpCircle();
$('#count-box').CountUpCircle({
duration: 2000 /* Integer - Unit: Millisecounds; How long to Count; Default value: 5000 */,
opacity_anim: true /* Boolean; Raise the Opacity of the element from 0 to 100%; Default: false */,
step_divider: 1 /* setp forward in bigger steps, for example for bigger numbers like >1000 */,
prefix:""/*string to be prepended in front of number*/,
postfix:""/*string to be appended after the number*/
});
This is a simple example, which is available in the demo folder.
<div class="wrapper">
<div id="count-box">19</div>
</div>
$('#count-box').CountUpCircle({
duration: 2000,
opacity_anim: true,
step_divider: 1,
prefix:"speed",
postfix:"KMPS"
});
<div class="wrapper">
<div id="count-box">819757</div>
</div>
$('#count-box').CountUpCircle({
duration: 4000,
opacity_anim: false,
step_divider: 3000
});