Counters
Animates a counter up to a given value. Can also count in reverse.
About the Plugin
Counters are handled by the countup.js library.
Our script provides a wrapper to the countup.js library allowing options to be specified as data attributes on counter elements.
Our wrapper works in conjunction with scrollMonitor to begin counting when the element is scrolled into view.
Despite its name, CountUp can count in either direction, depending on the parameters passed in.
Basic Usage
Counters are initialized by data-attributes on page load.
Add the data-countup
attribute to initialize the element as a counter.
By default, the counter will use the element's text and count up to that value from zero. The text is parsed by the javascript parseFloat
function, so you may use a decimal or integer.
<span data-countup>1234</span>