You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+27
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,16 @@ Counter-Up is a lightweight module that counts up to a targeted number when the
3
3
4
4
An improvement to https://github.com/bfintal/Counter-Up
5
5
6
+
### What Can You Count Up?
7
+
8
+
* Floats: `1.234`
9
+
* Integers: `1234`
10
+
* With commas: `1,234.56`
11
+
* With non-numeric characters: `$1,234.56`
12
+
* Multiple countable values: `604,800 seconds in 10,080 minutes in 168 hours in 7 days`
13
+
14
+
### Usage
15
+
6
16
**Install**
7
17
```bash
8
18
npm install --save counterup2
@@ -31,4 +41,21 @@ If you want to stop the counter immediately:
31
41
```js
32
42
// Stop counting. This brings back the original value.
33
43
counterUp( el, { action:'stop' } )
44
+
```
45
+
46
+
### Use with Waypoints
47
+
48
+
The counting is performed when `counterUp` is called. To make the counting start when the element becomes visible, use a visibility library like [Waypoints](https://www.npmjs.com/package/waypoints)
0 commit comments