我正在尝试使用jquery移动加载外部网站,并有一个加载的png,以便只有当外部网站页面加载后,加载的png消失。
你知道如何使用jquery mobile创建这种效果吗?
发布于 2012-04-13 23:35:06
您可以将函数绑定到ajax start、stop和error事件以显示您的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();
});https://stackoverflow.com/questions/8628175
复制相似问题