const urlToLoad = "winners.php";
const ajaxLoader = '<div class="preloaders"><img src="img/preloader.gif" alt="Loading..."></div>';
$(".page").click(function(){
$(".main").html(ajaxLoader).load(urlToLoad);
});
I am trying to showcase a .gif animation on a webpage, but it seems to be causing issues specifically in Google Chrome. It works perfectly fine in Firefox though. The concept is that upon clicking, the content should load with a preloader displayed if there's any delay.