JSFiddle - React, Tailwind, and code Playground
by Pradeep Shankar
HTML
<div><h2>Let AJAX change this text</h2></div>
<img src="http://www.w3schools.com/jquery/demo_wait.gif" id="loader" style="display:none;"/>
<button>Change Content</button>
JavaScript
$(document).ready(function(){
$(document).ajaxStart(function(){
$("#loader").show();
});
$(document).ajaxStop(function(){
$("#loader").hide();
});
$("button").click(function(){
$("div").load("http://www.w3schools.com/jquery/demo_ajax_load.asp");
});
});