让jQuery Mobile不显示loading界面的方法
来源:才华咖 本文已影响1.41W人
来源:才华咖 本文已影响1.41W人
jQuery Mobile 的一个BUG: 当不采用 ajax 以及 他自己的 back 返回的时候,即: 点击浏览器后退按钮时,将会从缓存之中加载页面,此时,讨厌的 loading 动画出来了,而且一直不消失。 网上找了好多解决方法,搜索了好久都没有好用的`,今天突然想起来个釜底抽薪,直接动jqeury-mobile 的类库.
用编辑器打开,
找到显示pageLoading的方法, showPageLoadingMsg 的定义处:
然后加上一句代码,if(""th<5)return;让此方法失效。
复制代码 代码如下:
showPageLoadingMsg:function(){if(""th<5)return;
保存,刷新测试。记得最好别出现中文,否则需要修改JS文件的编码格式。
OK,解决。
但是个人认为,如果后面需要用到那个方法,那没办法了,不工作。解决方案可以为: 污染,耦合式的全局变量判断,也就是设置某个全局变量,在此方法里进行if判断,是否强制返回。
如果有疑问,欢迎联系我。
Diaspora Finance Powers Global Development美文欣赏
How Do My Parents Feel About My Education英语作文
八年级英语下册《Would you mind keeping your voice down》教案
How I Finance My College Education英语作文
英语《Module 6 Unit 1 You can play football well》的教案设计
最新《Fate/Stay Night Unlimited Blade Works》经典名句
brought rain in April Mayflowe英语作文
英语满分作文:Reading-TheBestMeanstoAcquireknowledge
Modern Technology Makes Life More Conv英语六级作文
Module 7 Travel Unit 2 We are going to visit the Ming Tombs
A Lifeguard at Johns Beach Saved a Drowning Child,A Lifeguar英语作文
英语阅读:Covergirl unveils empowering brand update
《Module 4 Unit 2 Does Daming like bananas?》说课稿
英语阅读:VIT declines to acquire Ang Mo Kio property
Margaret Sanger: The Morality of Birth Control quo
让jQuery Mobile不显示loading界面的方法
不同的职位不同的面试方法你懂吗
Chemistry and Biology英语阅读
The place of Science and Technology in Modern Life英语作文
Module 8 Unit 2 We are turning around英语课堂教学反思
英国留学传媒硕士Media/Journalism/Communication解析
英国文学I wondered lonely as a cloud的赏析整理
Wonderful life in winter holiday作文(精选14篇)
Equal Rights between Men and Women高中英语作文
Djokovic Fulfilled Career Grand英语作文
Module 4 Unit1 We’re going to tell stories.教学设计
UN Chief Urges Leaders to Deliver on Climate Change美文欣赏
Fancy the original or movie ones大学英语作文
The Use of Body Language in School英语文章阅读
Unit 13 Lesson50 Standing Room Only说课稿
自己不足方面的发言
Food and place of interest in Beijing初中英语作文
显示器维修的方法总结
英语作文:Gulangyu,A fairyland in the world
英语作文Build a Harmonious Society
An unforgettable holiday英语作文
英语阅读:Feelings of joy and thoughts from joy
英语作文Why Are Bicycles So Commonly Used in China
jQueryMobile页面
Unit2 My schoolbag A Let’s learn教学反思