Hi Michael,

> E.g when you have a very short Ajax request, showing an image for a
> second or so is more annoying then really helping the user.

as it is hard to tell how long a request will take: How about delaying the 
display of the image for the 'annoying' amout of time? Something like this 
(untested):

$().ajaxStart(function() {
 $(#loading).pause(500).show();
});
$().ajaxStop(function() {
    $(#loading).clearQueue().hide();
});

This would delay the display of the image by 500 milliseconds. If the 
ajaxStop function is called, the queue is cleared, to prevent the image from 
showing at all. If it was displayed, it is hidden as normal. This can be 
achieved with Jonathan Howard's pause plugin: http://www.mythin.net/pause.js

-- Jörn 


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to