2011-12-25 30 views

回答

0

您可以綁定功能的AJAX啓動,停止和錯誤事件,以顯示你的PNG

// error with request 
$(document).ajaxError(function (event, xhr, settings, error){ 
// something went wrong 
}); 

// show loading indicator 
// when ajax requests start 
$(document).ajaxStart(function(){ 
showLoadingGraphic(); 
}); 

// remove loading indicator 
// when ajax requests complete 
$(document).ajaxStop(function(){ 
hideLoadingGraphic(); 
}); 
相關問題