首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >链接外部网站时使用Jquery mobile加载弹出窗口。

问链接外部网站时使用Jquery mobile加载弹出窗口。
EN

Stack Overflow用户
提问于 2011-12-25 12:16:00
回答 1查看 404关注 0票数 0

我正在尝试使用jquery移动加载外部网站,并有一个加载的png,以便只有当外部网站页面加载后,加载的png消失。

你知道如何使用jquery mobile创建这种效果吗?

EN

回答 1

Stack Overflow用户

发布于 2012-04-13 23:35:06

您可以将函数绑定到ajax start、stop和error事件以显示您的png

代码语言:javascript
复制
// 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();
});
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8628175

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档