在div中加载html时,jquery等待光标 [英] jquery wait cursor while loading html in div
本文介绍了在div中加载html时,jquery等待光标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想向用户显示结果正在加载的状态。
如何在使用$ MyDiv.load(page.php)加载结果时,如何更改游标或gif?
I want to show to the user a state that the result is loading. How can I change cursor or gif while loading result in div with $MyDiv.load("page.php") ?
推荐答案
- 最初设置加载图像不可见。
- 开始加载时,将样式更改为可见。
- 使用回调参数加载完成时,将样式更改为不可见加载()
示例:
$("#loadImage").show();
$("#MyDiv").load("page.php", {limit: 25}, function(){
$("#loadImage").hide();
});
这篇关于在div中加载html时,jquery等待光标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文