Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/popomore/loadingbar
A fake loading bar without server.
https://github.com/popomore/loadingbar
Last synced: about 2 months ago
JSON representation
A fake loading bar without server.
- Host: GitHub
- URL: https://github.com/popomore/loadingbar
- Owner: popomore
- Created: 2013-01-18T11:43:43.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-02-08T14:15:10.000Z (almost 12 years ago)
- Last Synced: 2024-10-16T21:23:20.373Z (3 months ago)
- Language: JavaScript
- Size: 104 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Loading Bar
A fake loading bar without server.
---
## Usage
```
loadingBar([[20, 100], [100, 500]], function(percent) {
$('#loading').css('width', percent + '%');
}, function() {
alert(complete);
});
```See [example](http://popomore.github.com/loadingBar/examples/)
## API
loadingBar(config, every, complete)
Loading Bar's minimum unit is 1%, and it will take diffrent timeout in every 1%. You can specify timeout in `config`.
### config
Specify timeout
`[[20, 100], [80, 200], [100, 500]]` means 0%~20% takes 100ms per unit and 20%~100% takes 500ms per unit.
### every
Every unit will be called.
### complete
100% will be called.
## License
MIT