Hi guys!
I want to show progress with jquery ui progress bar when an ajax request fires and when it finishes. The problem is I don't know how to set values for the progress bar depending on the progress of the ajax request. Please hlep. Here's a code to start with:
function ajaxnews()
{
$('.newstabs a').click(function(e){
var section = $(this).attr('id');
var url = base + 'news/section/' + section;
$.ajax({
url : url,
dataTye : 'html',
start : loadNews,
success : fillNews
});
});
}
// start callback functions
function loadNews()
{
$('#progressbar').fadeIn();
$('#progressbar').progressbar({ //how shoud I set the values here});
}
function fillNews()
{
$('#progressbar').progressbar('option', 'value', ?? /* how do I find this?*/);
$('#progressbar').fadeOut();
}