Changing cursor to waiting in javascript/jquery

后端 未结 13 2076
孤街浪徒
孤街浪徒 2020-12-04 10:43

\"enter

How would i get my cursor to change to this loading icon when a function is ca

13条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-04 11:11

    Please don't use jQuery for this in 2018! There is no reason to include an entire external library just to perform this one action which can be achieved with one line:

    Change cursor to spinner: document.body.style.cursor = 'wait';

    Revert cursor to normal: document.body.style.cursor = 'default';

提交回复
热议问题