Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chemzqm/counter
A simple number counter for component
https://github.com/chemzqm/counter
Last synced: about 1 month ago
JSON representation
A simple number counter for component
- Host: GitHub
- URL: https://github.com/chemzqm/counter
- Owner: chemzqm
- Created: 2013-09-05T06:56:10.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-09-22T10:24:20.000Z (over 11 years ago)
- Last Synced: 2024-10-29T10:08:34.500Z (about 2 months ago)
- Language: JavaScript
- Size: 230 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# Counter
A simple counter with number change animation for component
[Demo](http://chemzqm.github.io/counter/index.html)
## Installation
Install with [component(1)](http://component.io):
$ component install chemzqm/counter
## API
### new Counter(parentNode, [count])
Init new Counter in parentNode and optional charactor count (default 10).
### .digit(number)
Set the display integer of Counter.
## Example
``` js
var Counter = require('counter');
var p = document.getElementById('counter');
var counter = new Counter(p);
counter.digit(13764324);)
```## License
MIT