试了好多办法,在div中加载自定义的.gif图片等。
其实,jquery mobile中已经提供了加载的控件支持。
1. 显示loading...
$.mobile.loading('show', {
text: 'loading, please wait ...', //加载器中显示的文字
textVisible: true, //是否显示文字
theme: 'a', //加载器主题样式a-e
textonly: false, //是否只显示文字
html: "" //要显示的html内容,如图片等
});
2. 去除loading条
$.mobile.loading('hide');