A jQuery plugin to count up a number with start on element visible feature
npm install jquery-counter




bash
npm install jquery-counter --save
`$3
`html
`
or
`javascript
require('jquery');
require('jquery-counter');
`$3
`html
400
`
Through data properties you can set the following parameters:
| Prop | Type | Default | Note |
|---|---|---|---|
| offset | String | 200 | Element top offset (in pixels) based on view top offset to start the animation
| duration | String | 3000 | Time (in milliseconds) to count it up
| delay | String | 200 | Delay (in milliseconds) to start the animation as per the element becomes visible$3
`javascript
$('[data-counter]').counter();
`
JavaScript Options
`javascript
$('[data-counter]').counter({
decimals: 0,
decPoint: ".",
thousandsSep: ","
});
`
Methods
`javascript
$('[data-counter]').counter('bind');
``