I'm using jQuery deferred objects so I can pull data from multiple sources , however not sure how best to code in a loading message that displays whilst everything is being resolved and then hides when everything is resolved OR rejected
CURRENT CODE:
jQuery.when(loadData('ws-get-shops.php', {shopId:123}),loadData('ws-get-customers.php')).then(updateResults,showError);
var loadData = function(url, data){
var jqxhr = jQuery.ajax({
url:url,
data:data,
dataType:'jsonp',
timeout:60000
});
return jqxhr;
}