Skip to content

Instantly share code, notes, and snippets.

@nitindhar7
Created January 30, 2013 04:58
Show Gist options
  • Save nitindhar7/4670771 to your computer and use it in GitHub Desktop.
Save nitindhar7/4670771 to your computer and use it in GitHub Desktop.
// Initialize
$('#progressbar').progressbar({ value: 0 });
// Record current position in a list
current_position = 0;
// Record list length
list_length = $('li').length;
// Loop through the list
$('li').each(function() {
... do something ...
// update progress bar
$("#progressbar").progressbar("option", "value", current_position/list_length * 100);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment