Possible duplicate: Same problem (unresolved)
I show loading DOM before the Ajax call and after the Ajax call, I hide it. For some reason, the loading image appears only after ajax call completes. The result is that the loading image doesn't even appear unless I put delay(#).hide(0) The code is the following:
$("#loading-popup").show();
$.ajax({
// ajax here
});
$("#loading-popup").hide(0);
I have tested on other Ajax calls on my website and the same problem occurs. Has anyone got this resolved? I am using Chrome 26.
EDIT: I forgot to specify that I am using synchronous ajax call. (async: false)