Reputation: 2520
I found this Jquery progress bar function and I want to simply use it to show the progress bar while my web page is loading. Since my page is loading a bit slow, it serves as a reminder to the user that the page hasn't stopped loading. Below is the javascript and css part. Now how to implement it in the html part? What do I inlcude in the html body?
<script type="text/javascript" src="js/jquery.progressbar.js"></script>
<script type="text/javascript">
var progress_key = '<?= $uuid ?>';
$(document).ready(function() {
$("#pb1").progressBar();
$("#pb2").progressBar({ barImage:
'images/progressbg_yellow.gif'} );
$("#pb3").progressBar({ barImage:
'images/progressbg_orange.gif', showText: false} );
$("#pb4").progressBar(65, { showText: false, barImage:
'images/progressbg_red.gif'} );
$(".pb5").progressBar({ max: '2000', textFormat:
'fraction', callback: function(data) { if (data.running_value ==
data.value) {
alert("Callback example: Target reached!"); } }} );
$("#uploadprogressbar").progressBar();
});
</script>
<style type="text/css">
table tr { vertical-align: top; }
table td { padding: 3px; }
div.contentblock { padding-bottom: 25px; }
#uploadprogressbar { display: none; }
</style>
Thanks
Upvotes: 0
Views: 986
Reputation: 14943
Based on the demo you are referencing you need
<span class="progressBar" id="pb1"></span>
with either id pb1 .. pb4
Upvotes: 1