You could use a http://www.w3schools.com/js/js_timing.asp setTimeout to delay the box from showing.
I have had to deal with the same issue of my wait box 'flashing' for quick page loads, but instead of using setTimeout, I fade the box out. The fade always takes some time, so even on the quickest page the loading box shows up long enough to not be annoying, plus it has a nice fadeout effect $('#wait').fadeOut(); Kia Niskavaara wrote: > > > > How can I make my #wait container show only if there is a delay in the > response. Let's say that I > only want to show it if there is no response within 2 seconds. > > This is my current code, which often cause the wait box to show and then > hide, quickly - which looks > odd to the user: > > $(document).ready(function(){ > // show wait-box > $('#wait').css({opacity: 0}).animate({ opacity: 1 }, 3000); > // load content > $('#content').load('content.php', function() { $('#wait').hide(); }); > }); > > Kia > > -- View this message in context: http://www.nabble.com/%22please-wait%22-box-only-if-delayed-response-tf4170835s15494.html#a11866084 Sent from the JQuery mailing list archive at Nabble.com.