I have a single page web app that has very little to load initially and all subsequent data is loaded via ajax. During the wait I use CSS to show a wait cursor, but this doesn't affect the tab loading animation. For some reason, after sitting idle for a while, the tab will show a wait animation that never goes away. I can't find any information on what causes this behavior. I doubt it has to do with my waiting routine, but here it is....
Javascript:
// GET JSON DATA FROM CGI
queryData = function (action, queryObj, callback) {
// make sure query not blank
if ($.map(queryObj, function (val) { return val !== "" }).some(function (el) { return el })) {
queryObj.action = action;
$('body').addClass('wait');
$.getJSON(cgi_src, queryObj, function (result) {
callback(result);
}).fail(function () {
alert("QUERY FAILED");
}).always(function () {
$('body').removeClass('wait');
});
}
};
CSS:
.wait, .wait * { cursor: wait !important; }