如何改变游标等待时使用jQuery .load() [英] How to change cursor to wait when using jQuery .load()
本文介绍了如何改变游标等待时使用jQuery .load()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在等待来自.load()的响应时,是否有任何方法可以将游标更改为忙/等待游标?
While waiting for a response from a .load(), is there any way to change the cursor to the busy/wait cursor?
推荐答案
尝试:
更新为使用jQuery 1.8 +
$(document).ajaxStart(function() {
$(document.body).css({'cursor' : 'wait'});
}).ajaxStop(function() {
$(document.body).css({'cursor' : 'default'});
});
光标在任何ajax开始和结束时更改。包括 .load()
。
Cursor changes on any ajax start and end. That includes .load()
.
尝试不同的游标样式:
https://developer.mozilla.org/en-US/ docs / Web / CSS / cursor
这篇关于如何改变游标等待时使用jQuery .load()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文