2014-02-25 138 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. 
     });