https://github.com/mpavade/animationcounter.js
animationCounter.js is a jQuery plugin that animates a number from a value to another value or to an infinite value
https://github.com/mpavade/animationcounter.js
counter jquery jquery-plugin
Last synced: about 2 months ago
JSON representation
animationCounter.js is a jQuery plugin that animates a number from a value to another value or to an infinite value
- Host: GitHub
- URL: https://github.com/mpavade/animationcounter.js
- Owner: mpavade
- License: mit
- Created: 2017-03-09T07:57:41.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-26T13:28:50.000Z (over 8 years ago)
- Last Synced: 2025-10-10T22:52:17.980Z (2 months ago)
- Topics: counter, jquery, jquery-plugin
- Language: HTML
- Homepage: https://mpavade.github.io/animationCounter.js/example/
- Size: 1.43 MB
- Stars: 16
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# animationCounter.js
animationCounter.js is a jQuery plugin that animates a number from a value to another or to infinite value
# 1. Download & Installation
##### 1.1. Download the latest version from [GitHub](https://github.com/mpavade/animationCounter.js/archive/master.zip)
##### 1.2 or install via bower package manager:
```
bower install animationCounter.js
```
##### 1.3 Add your js file 'animationCounter.js' after jQuery, before your closing body tag
```html
```
# 2. Use
In your JS file, call the animationCounter() function with default parameters<br>
```javascript
$('yourdiv').animationCounter();
```
Or call animationCounter() function with your parameters like this the following example : <br>
```javascript
$('#yourdiv').animationCounter({
start: 0,
end: 500,
step: 1,
delay: 1000,
txt: ' €'
});
```
# 3. Options
| Parameters | Type | Definition | Default |
| ------ | ------ | ------ | ------ |
| `start` | integer | The value where the counter started | 0 |
| `end` | integer | The value where the counter stopped | null |
| `step` | integer | The interval between the values | 1 |
| `delay` | integer | The intervals (in milliseconds) on how often to execute the code | 1000 |
| `txt` | string | The text displayed after your counter | '' |
# 4. Demo
You can see how it's works on the <a href="https://mpavade.github.io/animationCounter.js/example/">demo</a> page
# 5. License
Copyright © Micheline Pavadé<br>
This project is released under the [MIT License](LICENSE).