.ajaxStart different to each $.ajax() call..?
Hello all,
I have several Ajax calls inside one single page, i.e.
// Example Ajax Function
$.ajax({
url: 'phpPage.php?catId=14418350',
success: function() {
alert("Operation Completed.");
},
error: function() {
alert("Load FAILED.");
},
timeout: 3600000
});
Nevertheless, I need different progress bars to be updated per ajax call:
$('#hello').ajaxStart(function() {
var i = setInterval(function() {
$.getJSON("progressReporting.php?catId=14418350", function(data) {
if (data == null) {
clearInterval(i);
location.reload(true);
return;
}
var percentage = Math.floor(100 * parseInt(data.prod) / parseInt(data.total));
$("#progressBar").progressbar("value",percentage);
});
}, 500);
});
Is it possible to include the ajaxStart functionality in each ajax call separately?
Many thanks!