JSFiddle - React, Tailwind, and code Playground
HTML
<div class="fakebody">
<button id="foo">Foo</button>
</div>
CSS
html, body {
height: 100%;
}
.fakebody.wait {
cursor: wait;
}
JavaScript
$('#foo').on('click', function (e) {
$('.fakebody').addClass('wait').queue(function(n) {
for (i = 0; i < 10000; i++) { console.log(i); }
}).removeClass('wait').dequeue();
});