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
-**[CountUp.js with jQuery](https://gist.github.com/inorganik/b63dbe5b3810ff2c0175aee4670a4732)**
30
-
31
-
32
19
## Features
33
-
-**Animate when element scrolls into view** - new in v2.1.0. Use option `enableScrollSpy`.
20
+
-**Animate when element scrolls into view.** Use option `enableScrollSpy`.
34
21
-**Highly customizeable** with a large range of options, you can even substitute numerals.
35
22
-**Smart easing**: CountUp intelligently defers easing until it gets close enough to the end value for easing to be visually noticeable. Configureable in the [options](#options).
23
+
-**Plugins** allow for alternate animations like the [Odometer plugin](https://www.npmjs.com/package/odometer_countup)
-**Separate bundles** for modern and legacy browsers, with and without the requestAnimationFrame polyfill. Choose `countUp.min.js` for modern browsers or `countUp.withPolyfill.min.js` for IE9 and older, and Opera mini.
37
26
38
27
## Usage:
39
28
40
-
**On npm** as: `countup.js`. You can import as a module or include the UMD script and access CountUp as a global. See [detailed instructions](#including-countup) below.
On npm as `countup.js`. You can import as a module, or include the UMD script and access CountUp as a global. See [detailed instructions](#including-countup) on including CountUp.
41
42
42
43
**Params**:
43
44
-`target: string | HTMLElement | HTMLInputElement` - id of html element, input, svg text element, or DOM element reference where counting occurs
@@ -120,7 +121,8 @@ Update the end value and animate:
120
121
countUp.update(989);
121
122
```
122
123
123
-
### Animate when the element is scrolled into view
124
+
---
125
+
### **Animate when the element is scrolled into view**
124
126
125
127
Use the scroll spy option to animate when the element is scrolled into view. When using scroll spy, just initialize CountUp but do not call start();
126
128
@@ -136,6 +138,20 @@ CountUp checks the scroll position as soon as it's initialized. So if you initia
136
138
// after DOM has rendered
137
139
countUp.handleScroll();
138
140
```
141
+
---
142
+
### **Alternate animations with plugins**
143
+
144
+
Currently there's just one plugin, the **[Odometer Plugin](https://github.com/msoler75/odometer_countup.js)**.
0 commit comments