0.1.0 • Published 8 years ago

counter-up.js v0.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

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