JSFiddle - React, Tailwind, and code Playground

HTML

<div id="LoaderDiv" style="display: none">
    <img id="ImageLoader" src="Images/loading.gif" />
 </div>

JavaScript

$('#LoaderDiv').show();

            $.ajax({
                type: "POST",
                contentType: "application/json; charset=utf-8",
                url: "http://stackoverflow.com/questions/26906172/loader-not-working-during-synchronous-ajax-call-in-chrome#comment48831905_26906172",
                async: false,
                success: function (data) {
                    console.log(data.d);
                    $('#LoaderDiv').hide();
                }
                
                error: function(data){
                       $('#LoaderDiv').hide(); 
               }
            });