JSFiddle - React, Tailwind, and code Playground
HTML
<div id="testit">
<div class="loading">
My loading message
</div>
<div class="formstuff">
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
<input type="button" id="showhide" />
</div>
</div>
JavaScript
$(document).ready(function(){
$("#showhide").click(function(){
alert("clicke");
$(".loading").show();
$(".formstuff").hide();
return false;
});
});