How would i get my cursor to change to this loading icon when a function is ca
A colleague suggested an approach that I find preferable to the chosen solution here. First, in CSS, add this rule:
body.waiting * {
cursor: progress;
}
Then, to turn on the progress cursor, say:
$('body').addClass('waiting');
and to turn off the progress cursor, say:
$('body').removeClass('waiting');
The advantage of this approach is that when you turn off the progress cursor, whatever other cursors may have been defined in your CSS will be restored.
If the CSS rule is not powerful enough in precedence to overrule other CSS rules, you can add an id to the body and to the rule, or use !important
.