I'm working with the jQuery ProcessBar [custom label version]. I'm making it so I can check the values inside. I care about the percentage of the bar and the text that is displayed. I can change these values from inside the function. Notice the "progress(15);" and the "progressLabel.text("text");"
I would like to change these from in my body. How can I do this?
I'm also a little confused on the code, because originally this was a complete function. Meaning that they built it to show off. So when you ran the page it automatically went from 0 to 100 percent and complete. My goal is to control it.
$(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(val)
{
progressbar.progressbar( "value", val );
if ( val < 99 )
{
setTimeout( progress, 100 );
}
}
progress(15);
progress(20);
progress(99);
progressLabel.text("text");
setTimeout( progress, 3 );
});
Right now I'm trying:
$('#progressbar').progressLabel.text('text');
It's worth mentioning, that I am very new to jQuery.