Question : show loader before page load
Answered by : sheikh-sohanur-rahman
<div id="overlay"> <img src="loading.gif" alt="Loading" /> Loading...
</div>
<script type="text/javascript"> $(window).load(function(){ // PAGE IS FULLY LOADED // FADE OUT YOUR OVERLAYING DIV $('#overlay').fadeOut(); });
</script>
Source : https://stackoverflow.com/questions/11072759/display-a-loading-bar-before-the-entire-page-is-loaded | Last Update : Fri, 18 Feb 22
Question : if page is loading then show loader in js
Answered by : energetic-echidna-kdd7d3dcfa1v
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
Source : https://www.codexworld.com/display-loading-image-while-page-loads-jquery-css/ | Last Update : Sun, 02 May 21