Created
December 4, 2012 02:27
-
-
Save kborchers/4199953 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
var progressbar = $( "#progressbar" ), | |
progressLabel = $( ".progress-label" ); | |
progressbar.progressbar({ | |
value: false, | |
change: function() { | |
progressLabel.text( progressbar.progressbar( "value" ) + "%" ); | |
}, | |
complete: function() { | |
progressLabel.text( "Complete!" ); | |
} | |
}); | |
function progress() { | |
var val = progressbar.progressbar( "value" ); | |
if ( !val ) { | |
val = 0; | |
} | |
progressbar.progressbar( "value", val + 1 ); | |
if ( val >= 100 ) { | |
return; | |
} else { | |
setTimeout( progress, 100 ); | |
} | |
} | |
setTimeout( progress, 3000 ); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment