Because the page I am working on is an intranet page, my AJAX call is very quick along with the response. For usability purposes I'd like a short 1-2 sec pause to display a loading animation. Below is what I have tried but the animation is barely visible.
$(document).ready(function(){
$('#wait').hide();
$('#submitform').click(function(){
$('#wait').show();
$.ajax({
type: "POST",
url: "abs_newabs_check.asp",
data: { StaffID: $("#suggest1").val() },
success: callback
});
});
});
function callback(data, status)
{
$('#wait').hide();
$("#ajaxdiv").html(data);
}