2015-04-20 4 views
0

Я попытался удалить .fadeOut("slow"), но страница не загружается.Как удалить эффект выцветания в этом предварительном загрузчике?

Каков правильный способ удаления эффекта затухания страницы на этот код предварительного натяжения?

<script type="text/javascript"> 
// makes sure the whole site is loaded 
jQuery(window).load(function() { 
    // will first fade out the loading animation 
    jQuery("#status").fadeOut("slow"); 
    // will fade out the whole DIV that covers the website. 
    jQuery("#preloader").delay(5).fadeOut("slow"); 
}) 
</script> 
<style> 
#preloader { 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background-color: #fefefe; 
    z-index: 99; 
    height: 100%; 
} 
#status { 
    display: block; 
    position: absolute; 
    top: 0; 
    left: 0; 
    z-index: 100; 
    width: 100vw; 
    height: 100vh; 
    background-image: url("images/loader.gif"); 
    background-repeat: no-repeat; 
    background-position: center; 
} 
</style> 
<div id="preloader">Loading... Please Wait.</div> 
<div id="status">&nbsp;</div> 

ответ

0

Изменение кода JS к следующему, вероятно, должны сделать работу

jQuery(window).load(function() { 
     // will first fade out the loading animation 
     jQuery("#status").hide(); 
     // will fade out the whole DIV that covers the website. 
     jQuery("#preloader").hide(); 
}) 

Но лучше просто удалить div тег с «прелоадер» id. Это приведет к удалению всех элементов preloader a a whole и не должно отображаться вообще.

+0

Я хочу сказать, что эффект выцветания ... но preloader.gif удален ... в этом коде. Спасибо за ответ. – unknowdev

+0

Его работа теперь спасибо .. – unknowdev