2013-01-22 1 views
0

페이지가로드되는 동안이 loding 그래픽을 표시하는 데 사용되는이 스크립트가 있습니다.jQuery on loading 그래픽로드를 활성화하려면 클릭하십시오.

$(window).load(function() { // makes sure the whole site is loaded 
     $("#status").fadeOut(); // will first fade out the loading animation 
     $("#preloader").delay(100).fadeOut("fast"); // will fade out the white DIV that covers the website. 
    }) 

이것은 페이지로드시 즉시 나타납니다. 페이지 이탈시이 쇼를 만드는 방법에 대한 아이디어가 있습니까? 그래서 사용자가 클릭에서로드로 일관성?

+0

아마도 '$ (document) .ready (function() {})'일까요? – pktangyue

+0

무엇 abot'$ (창) .unload (함수()' –

답변

0

unload을 사용하십시오.

$(window).unload(function() { 
     $("#status").fadeOut(); 
     $("#preloader").delay(100).fadeOut("fast"); 
});