【发布时间】:2013-04-23 00:10:48
【问题描述】:
我有以下代码:
HTML:
<link rel="stylesheet" href="js/jquery.mobile-1.3.1.min.css"/>
<script src="js/jquery-1.9.1.min.js"></script>
<script src="js/jquery.mobile-1.3.1.min.js"></script>
JS:
$(document).on({
ajaxStart: function() {
$.mobile.loading('show');
console.log('getJSON starts...');
},
ajaxStop: function() {
$.mobile.loading('hide');
console.log('getJSON ends...');
}
});
我目前正在使用 Jquery Mobile 1.3.1 并在 mozilla firefox 和 google chrome 中测试此代码。稍后我将在 phonegap 应用中使用它。
我正在加载 JSON 并在列表视图的屏幕上显示它。加载时,我希望程序显示“加载微调器”。控制台日志显示 ajaxStart 正在触发,但屏幕上的任何地方都没有可视微调器。
我做错了什么?请帮忙!
提前致谢。
【问题讨论】:
标签: javascript jquery css cordova jquery-mobile-loader