counter-up.js

0.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i counter-up.js

Weekly Downloads

1

Version

0.1.0

License

MIT

Last publish

Collaborators

  • brandrevive