The progress bar is designed to simply display the current % complete for a process and can be animated by updating the current values over time. The bar is coded to be flexibly sized through CSS and will scale to fit inside it's parent container by default.
This is a determinate progress bar, meaning that it should only be used in situations where the system can accurately update the current status complete. A determinate progress bar should never fill from left to right, then loop back to empty for a single process -- if the actual percent complete status cannot be calculated, an indeterminate progress bar (coming soon) or spinner animation is a better way to provide user feedback.
$("#progressbar").progressbar({ value: 37 });
<!DOCTYPE html> <html> <head> <link type="text/css" href="http://jqueryui.com/latest/themes/base/ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="http://jqueryui.com/latest/jquery-1.3.2.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.core.js"></script> <script type="text/javascript" src="http://jqueryui.com/latest/ui/ui.progressbar.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#progressbar").progressbar({ value: 37 }); }); </script> </head> <body style="font-size:62.5%;"> <div id="progressbar"></div> </body> </html>
This event is triggered when the value of the progressbar changes.
change
event as an init option.
$('.selector').progressbar({
change: function(event, ui) { ... }
});
change
event by type: progressbarchange
.
$('.selector').bind('progressbarchange', function(event, ui) {
...
});
Remove the progressbar functionality completely. This will return the element back to its pre-init state.
Disable the progressbar.
Enable the progressbar.
Get or set any progressbar option. If no value is specified, will act as a getter.
This method gets or sets the current value of the progressbar.
The jQuery UI Progressbar plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.
If a deeper level of customization is needed, there are widget-specific classes referenced within the ui.progressbar.css stylesheet that can be modified. These classes are highlighed in bold below.
Note: This is a sample of markup generated by the progressbar plugin, not markup you should use to create a progressbar. The only markup needed for that is <div></div>.