如何将加载时的光标更改为默认值
我有以下代码可以在单击超链接时更改光标
$('a').click(function () {
$('*').css("cursor", "progress");
});
单击链接时,光标完全按照预期更改为“进度”(即等待光标)。然而,问题是加载新页面后光标仍保持“进度”状态。仅在鼠标移动后才更改为默认值。这与另一个问题相关。其他人也表达了同样的问题。
正如标题所描述的,我希望在页面加载时将光标更改为默认值。
I have the following code to change the cursor when a hyperlink is clicked
$('a').click(function () {
$('*').css("cursor", "progress");
});
When a link is clicked, the cursor changes to "progress" (i.e. wait cursor) exactly as expected. However, the problem is that the cursor remains "progress" after a new page is loaded. It changes to default only after the mouse moves. This is related to another question. Others expressed the same problem.
As described by the title, I hope to change the cursor to default when a page is loaded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您没有明确指定如何使用它,但以下是如何使用 ajax 调用执行您描述的行为的示例:
You didn't clearly specify how it's meant to be used but here's an example of how to perform the behaviour you describe with an ajax call: