Skip to content

BrandRevive/counter-up.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Pure JS counter that counts up. Useful for statistics.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published