Feb 17, 2010
jQuery Progress Bar Configuration
Author: gaweee | Filed under:The uncompressed jQuery Progress bar code contains the following override-able defaults:
{ steps : 20, stepDuration : 20, max : 100, showText : true, textFormat : 'percentage', width : 120, height : 12, callback : null, boxImage : 'images/progressbar.gif', barImage : { 0: 'images/progressbg_red.gif', 30: 'images/progressbg_orange.gif', 70: 'images/progressbg_green.gif' }, };
Lets explain each configuration option:
| Option | Description | Default Value | Possible Values |
|---|---|---|---|
| steps | Number of steps taken for the progress bar to go from empty to full | 20 | Any positive integer |
| stepDuration | The duration between each call in milliseconds. A small number creates a smoother animation but increases CPU load 17th Feb 2010: Renamed from step_duration. If stepDuration doesnt work for you, try step_duration |
20 | Any positive integer |
| max | Maximum value. This could represent the fraction denominator. | 100 | Any Positive integer |
| showText | Determines if the progress status text should be shown beside the progress bar | true | Boolean |
| textFormat | Determines if the rendered text is a percentage or fraction form | percentage | ‘percentage’ or ‘fraction’ |
| width | Width of the progress bar image | 120 | Any positive integer |
| height | Height of the progress bar image | 12 | Any positive integer |
| callback | Callback function initiated after each progress render. | null | Anonymous function |
| boxImage | Box/border image of the progress bar | images/progressbar.gif | URL path to the progress bar image |
| barImage | Colored progress bar background image. When a set of images and key value points are used, the progress bar will swap out the image when the key value point has been achieved. This allows progress bars which colors morph according to its value. |
{ 0: 'images/progressbg_red.gif', 30: 'images/progressbg_orange.gif', 70: 'images/progressbg_green.gif' } |
Object with sets of URL path to images for a particular key value points (integer only). Alternatively, use a single URL for all values |
read users' comments (0)
Most Popular
- HOWTO: PHP and jQuery upload progress bar (48)
- JQuery Progress Bar 1.1 (42)
- Howto: Repackageable custom extension development in Magento - Part 2 - Admin Controller (24)
- Howto: Repackageable custom extension development in Magento - Part 8 - CRUD - Update (16)
- HOWTO: struts 2 i18n (13)
- JQuery Progress Bar 2.0 (12)
- JQuery Progress Bar 1.2 (11)
- Howto: Repackageable custom extension development in Magento (9)
- Howto: Repackageable custom extension development in Magento - Part 3 - Database (9)
- Howto: Repackageable custom extension development in Magento - Part 9 - Frontend - List (8)
Recent Comments
- learning methods: All the posts you talk
- best travel agency: Wow! I really enjoyed this
- Muzafar Ali: Hi, thanks for sharing a beautiful
- andy65007: After the progress bar
- Mark: Excellent tutorials. Most "how to
- Mark: As Jim said before, you
- Jeremy Roberts: I tried and it works
- Silas Nordes: Came to this site by
- 150cc mopeds: That was a superb blog
- Jason: if the situation is like
Latest Entries
- jQuery Progress Bar Configuration
- Extracting email addresses from inbox
- 10 Good (Free and Legal) Source for Photos and Images
- Howto: Backup Microsoft SQL Server Database, as in Dump it to a SQL Script (like MYSQL's sqldump)
- Managing client's expectation with wireframe software
- Howto: Repackageable custom extension development in Magento - Part 9 - Frontend - List
- JQuery Progress Bar 2.0
- HOWTO: Find icons for your new prototype system
- Google Maps Helper
- laying the cornerstones