Many times the ajax request gets timeout and the show/hide or slideup/ down function gets stalled. Even the next succcessful ajax call does not update the element.
I wonder how can I set up some global callback / local callback function so that those element which should have been updated are cleared up for next successful callback. for example, lets say I have this code function test(){ $("#loading").slideDown("slow"); $.get(url,function(result){ $("container").html(result); $("#loading").slideUp("slow"); } Now as the function test is called it shows the loading div slidedown showing the message "loading...." and once the ajax request is successful, the same div slideup. However, in case the ajax request timeout occurs, the div stays open and even if the next call to this function results in successful ajax request, this div stays open. Basically it likks the show. Everything is sorted out once you refresh the page. How can I sort this practical question/problem?