I am currently using Blockui to block the page and show a loading gif when an ajax function is being performed. See here:
$(document).ready(function() {
//shows loading screen whilst posting via ajax
$().ajaxStart(function() {
$.blockUI({ message: '<h1><img src="../images/layout/busy.gif" /> Just a moment...</h1>' }); });
$().ajaxStop($.unblockUI);
//Load table from table.php
//Timestamp resolves IE caching issue
var tsTimeStamp= new Date().getTime();
$.get('table.php',
{action: "get", time: tsTimeStamp},
function(data){
$('#customertable').html(data).slideDown('slow');
});
return true;
});
My problem is that this blocks the page everytime an ajax function is perform. How would I make it appear only when certain functions are being performed