JSFiddle - React, Tailwind, and code Playground
HTML
<div id='wrapperForThePage'>Where page content would be, click me</div>
<div id='loadingSplash'>Loading Splash</div>
CSS
#loadingSplash {
display: none;
}
JavaScript
$('#wrapperForThePage').click(function() {
$('#wrapperForThePage').fadeOut(function() {
$('#loadingSplash').fadeIn();
$('#wrapperForThePage').load("/ajax_html_echo/", function() {
$('#loadingSplash').fadeOut(function() {
$('#wrapperForThePage').text('loaded').fadeIn();
});
});
});
});