2014-02-25 192 views
0

在asp.net中加載頁面後,不會隱藏預加載器。我試過兩個javascript代碼。但沒有幫助。在asp.net中加載頁面後,不會隱藏預加載器

XAML代碼 -

<script type="text/javascript"> 
     jQuery(window).load(function() { // makes sure the whole site is loaded 
      jQuery("#status").fadeOut(); // will first fade out the loading animation 
      jQuery("#preloader").delay(1000).fadeOut("slow"); // will fade out the white DIV that covers the website. 
     }) 
</script> 

<body > 
    <div id="preloader"> 
      <div id="status">&nbsp;</div> 
    </div> 

Coding... 

XAML代碼 -

 <script type="text/javascript"> 
      function hide_preloader() { 
       $("#preloader").fadeOut(100); 
      } 
    </script> 

    <body onload="hide_preloader();" > 
     <div id="preloader"> 
       <div id="status">&nbsp;</div> 
     </div> 
..CODEING... 

圖片 enter image description here

回答

1

嘗試

jQuery(document).ready(function() { // makes sure the whole site is loaded 
      jQuery("#status").fadeOut(); // will first fade out the loading animation 
      jQuery("#preloader").delay(1000).fadeOut("slow"); // will fade out the white DIV that covers the website. 
     });