[jQuery] .load: how to make sure ajax-loader.gif stays visible until the injected html is actually visible?

[jQuery] .load: how to make sure ajax-loader.gif stays visible until the injected html is actually visible?


Hi,
In the below code, the ajax-loader disappears before the html returned
by .load is actually visible in the browser. How can I correct it?
$.post("registerClient.php", data, function(returned){
$("#client").html(returned);
$("#all-clients").load("allClients.php", function(){
$("span#ajax-loader").html('');
});
});Regards,
-jj.