javascript - JQuery Mobile 1.5.0 加载消息
问题描述
我使用的是 Jquery Mobile 1.3.0。由于上一版本的错误,我决定更改并使用新版本(1.5.0)。加载页面时,页面底部会出现加载文本。在以前的版本中,我使用了此代码,并且它有效:
$.mobile.loadingMessage = false;
但是,对于新版本,它不起作用。
谢谢你的帮助。
解决方案
是的,这已经改变了。您可以覆盖全局默认设置,如下所示:
<!-- JQM theme shall be loaded before structure -->
<link rel="stylesheet" href="css/jquery.mobile-1.5.0.alpha.theme.css" />
<link rel="stylesheet" href="css/jquery.mobile-1.5.0.alpha.structure.css" />
<script type="application/javascript" src="js/jquery-3.2.1.js"></script>
<script>
$(document).on("mobileinit", function () {
$.mobile.loader.prototype.options.text = "";
$.mobile.loader.prototype.options.textVisible = false;
});
</script>
<script type="application/javascript" src="js/jquery.mobile-1.5.0.alpha.js"></script>
...但稍后您仍然可以选择根据loader
需要显示消息文本:
$.mobile.loading("show", {
text: "foo",
textVisible: true
});
推荐阅读
- docker - 配置、扩展 Grafana Docker 容器
- php - laravel 5.7.15 419 抱歉,您的会话已过期。请刷新并重试
- ios - Xamarin iOS 故事板拉伸对象
- python - 如何爬取Goodreads并获取数据
- bash - 启动新的 mac 终端窗口时出现意外的 -bash 命令未找到错误
- scala - 如何将 Apache Spark 日志从驱动程序和从属设备重定向到使用 log4j 启动 Spark 作业的机器的控制台?
- angular - Angular 服务全局注入
- c# - 如何使用 .NET NEST 客户端在函数评分查询中创建过滤器
- java - Tomcat - 删除临时和工作目录解决了类路径问题 - 但为什么呢?
- java - 在 Java 中调用 Get Request 时出现 404 错误