- Overview
- Documents
Number Progress Bar is a jQuery plugin that creates a slim progress bar with support for accelerated Javascript animations and custom value range.
Source: github.com
May 19, 2014 in Animation 3290 views
Number Progress Bar is a jQuery plugin that creates a slim progress bar with support for accelerated Javascript animations and custom value range.
Source: github.com
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" type="text/css" href="number-pb.css"> <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script> <script src="src/jquery.velocity.min.js"></script> <script src="number-pb.js"></script>
2. HTML
<div class="number-pb"> <div class="number-pb-shown"></div> <div class="number-pb-num">0%</div> </div>
3. JAVASCRIPT
var bars = $('.number-pb').NumberProgressBar(barOptions); bars.reach(dest, reachOptions); //dest is the progress # at which you want to reach
4. OPTIONS
barOptions
These are the options you can configure when initializing a progressbar.
Option | Default | Usage |
---|---|---|
duration | 10000 | The duration (in ms) needed from 0 to 100 |
min | 0 | The min # of the progress |
max | 100 | The max # of the progress |
current | 0 | The initial # of the progress |
shownQuery | '.number-pb-shown' | Your query string for the shown bar |
numQuery | '.number-pb-num' | Your query string for the number |
These are the options for each reach operation: bar.reach(dest, reachOptions).
Option | Default | Usage |
---|---|---|
duration | null | The duration for a reach operation. |
complete | null | The callback when a reach operation is done. |
Tagged with:
number progress bar
progress bar
jquery plugin
slim progress bar
animations
value range
progress
lovely progressbar
bar
android
Related Articles