JSFiddle - React, Tailwind, and code Playground
HTML
<h1>
Ajax start loader
</h1>
JavaScript
$(document)
.ajaxStart(function () {
//ajax request went so show the loading image
$loading.show();
})
.ajaxStop(function () {
//got response so hide the loading image
$loading.hide();
});