我有一个锚链接在我的网页。我已经写了一个PHP文件,使ZIP几个文件,并下载它。在这里,我给出了如下链接。
<a href="externalfile.php?id=100">Make A Zip</a>
实际上,制作ZIP并下载需要花费很多时间。所以我想在这里放一些动画。当我点击链接"制作Zip"时,我可以在页面舍入时显示动画图像吗?请分享你的建议…
有什么建议吗?谢谢Sateesh
For that purpose you can use jquery mobile loadingmaessage or otherwise you can use custom image with animation.
$(document).on('pagebeforecreate', '#index', function(){
var interval = setInterval(function(){
$.mobile.loading( 'show', {
text: 'foo',
textVisible: true,
theme: 'z',
html: ""
});
clearInterval(interval);
},1);
});
$(document).on('pageshow', '#index', function(){
var interval = setInterval(function(){
$.mobile.loading( 'show', {
text: 'foo',
textVisible: true,
theme: 'z',
html: ""
});
clearInterval(interval);
},1);
});
在HTML页面包含jquery移动库,你可以给jquerymobile CDN从jquerymobile.com网站。之后,将上述代码添加到HTML页面的脚本标记odf中。