counter-up.js
v0.1.0
Published
Pure JS counter that counts up. Useful for statistics.
Downloads
4
Readme
counter-up.js
Pure JavaScript counter that counts up. Useful for statistics.
See the demo for an example.
Usage
statCounter(statElement, statData, speed);
Example
<script src="counter-up.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
statCounter('stats', [
{ label: 'Cities', amount: 9 },
{ label: 'Hackers', amount: 50 },
{ label: 'Pizzas', amount: 99 },
], 200);
});
</script>
You can also install this through npm.
$ npm install --save counter-up.js