As per the question I asked here: Ajax Animation JQuery 1.9.2
I'm using an animation to highlight the AJAX data refresh. However it's a bit obtrusive when most of the time the refresh takes less than half a second. I'd like to fade the animation in.
Here's the updated fiddle provided by the previous answer: DEMO
So we have the code:
$(document).ajaxStart(function () {
$("body").addClass("loading");
});
$(document).ajaxStop(function () {
$("body").removeClass("loading");
});
I've tried a number of things such as putting additional paramters into the add class addClass("loading",500) addClass("loading",500,500)
and putting .fadeIn(500); in a number of places but it doesn't seem to make any difference.
How can I fade the DIV in?