在asp.net中加载页面后,预加载器不会隐藏

时间:2014-02-25 07:11:22

标签: c# javascript asp.net

预加载器在asp.net中加载页面后不隐藏。我试过两个javascript代码。但没有帮助。

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 个答案:

答案 0 :(得分: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.
        });