6eb38308
Andy
add
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
Counter-Up
==========
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](http://imakewebthings.com/jquery-waypoints/)*
Demo
====
**[DEMO](http://bfintal.github.io/Counter-Up/demo/demo.html)**
Usage
=====
**Include**
```
<script src="http://cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js"></script>
<script src="jquery.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
Social Stuff
============
Twitter: [@bfintal](https://twitter.com/bfintal) & [@gambitph](https://twitter.com/gambitph)
Google+: <a href='https://plus.google.com/113101541449927918834' rel='author'>+Benjamin Intal</a>
|