jQuery Progress Timer 1.0.3
I realized when I was looking at the code on my plugin that the showPercentage option would only work half the time.
So I added a new option.
showHtmlSpan: true | false; |
So now you should be able to use this and not show any percentage or html in the progress bar.
<div class="loading-progress-3-1"></div>
<script>
var progress31 = $(".loading-progress-3-1").progressTimer({
timeLimit: 10,
onFinish: function () {
console.log('completed!');
},
showHtmlSpan: true
});
$.ajax({
url: "http://localhost/"
}).error(function () {
progress31.progressTimer('error', {
errorText: 'ERROR!',
onFinish: function () {
console.log('There was an error processing your information!');
}
});
}).done(function () {
progress31.progressTimer('complete');
});
</script>
<div class="loading-progress-3-2"></div>
<script>
var progress32 = $(".loading-progress-3-2").progressTimer({
timeLimit: 30,
onFinish: function () {
console.log('completed!');
},
showHtmlSpan: false
});
$.ajax({
url: "http://localhost/"
}).error(function () {
progress32.progressTimer('error', {
errorText: 'ERROR!',
onFinish: function () {
console.log('There was an error processing your information!');
}
});
}).done(function () {
progress32.progressTimer('complete');
});
</script>
Default Settings
//total number of seconds
timeLimit: 60,
//seconds remaining triggering switch to warning color
warningThreshold: 5,
//invoked once the timer expires
onFinish: function () {
},
//bootstrap progress bar style at the beginning of the timer
baseStyle: '',
//bootstrap progress bar style in the warning phase
warningStyle: 'progress-bar-danger',
//bootstrap progress bar style at completion of timer
completeStyle: 'progress-bar-success',
//show html on progress bar div area
showHtmlSpan: true,
//set the error text when error occurs
errorText: 'ERROR!'