JSFiddle - React, Tailwind, and code Playground
by magnix2k
HTML
<div id="content-loaded"></div>
<div id="loading">Loading</div>
JavaScript
(function($)
{
$(document).ready(function()
{
$.ajaxSetup(
{
cache: false,
beforeSend: function() {
$('#content-loaded').hide();
$('#loading').show();
},
complete: function() {
$('#loading').hide();
$('#content-loaded').show();
},
success: function() {
$('#loading').hide();
$('#content-loaded').show();
}
});
var $container = $("#content-loaded");
$container.load("http://www.svrsstatus.com/banner_outage_sample.html");
});
})(jQuery);