jeudi 21 janvier 2021

Why the preloader gif stops working after refreshing 3-4 times

visit My website and try refreshing the site 3-4 times the preloader gif will work but after refreshing 3-4 times the preloader is shown but the gif is stucked you can run the code below and wait some time the gif will stuck. please help me. My codes for preloader are as follows: HTML:

 <script>/*====================================* Preloader Effect======================================*/ $(window).load(function() {   $(&quot;#status&quot;).fadeOut(&quot;slow&quot;);   $(&quot;#preloader&quot;).delay(350).fadeOut(&quot;slow&quot;); $(&#39;body&#39;).delay(350).css({&#39;overflow&#39;:&#39;visible&#39;}); 
   if ( ! sessionStorage.getItem( 'doNotShow' ) ) {
            sessionStorage.setItem( 'doNotShow', true );
            Preloader();
        } else {
           $ ('.loader, .preloader').hide();
        } 
   });</script> 
body {overflow: hidden; }#preloader {    position: fixed;    top: 0;    left: 0;    right: 0;    bottom: 0;    background-color: #ffffff;    z-index: 99999;}#status {    position: absolute;    left: 50%;    top: 50%;    background-image: url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBKMB3B1iDOzWVstyCUqFBhZsqS9chI7yBdB6OHp7HOkPiEzlwCPOW40JlBtdF4XYyIh0hnChzmjEiRzdkuXQ06Zmacde9T9SQS9qm8FKpIt1IkM5S0EuusAdKmjyfcd4ZDoRmhyphenhyphentpo9I/s320/cubeload_81544351+%25281%2529.gif);     background-repeat: no-repeat;   background-position: center;   width: 250px;    height: 250px;    margin: -120px 0 0 -120px;    padding: 0;}
<div id='preloader'>
    <div id='status'>
    </div>
  </div>



Aucun commentaire:

Enregistrer un commentaire