JSFiddle - React, Tailwind, and code Playground

HTML

<div class="fakebody">
    <button id="foo">Foo</button>
</div>

CSS

.fakeBody {
    height: 1000px;
    width: 100%;
}
.wait {
    cursor: wait !important;
}

JavaScript

$('#foo').on('click', function (e) {
    $('.fakebody').addClass('wait');
    for (i = 0; i < 10000; i++) {
        console.log(i);
    }
    $('.fakebody').removeClass('wait');
});