2011-07-28 42 views

回答

0

试试这个它会在所有的浏览器工作,即使他们是缓慢的JavaScript执行类似IE 6/7

$(document).ready(function(){ 

    $("LoadingContainer").dialog('open'); 

    setTimeout(function(){ 
    //Put all the stuff here which you want to execute on load 

    //Finally close the loading dialog 
    $("LoadingContainer").dialog('close'); 

    }, 400); 

}); 
+0

不知道我在做什么错。什么都不显示。 – tim

1

body标签后面设置并显示对话框,并在document.ready时将其解除。

0

我将有一个显示该消息的元素,只是将其隐藏在文件准备就绪。例如:

$(document).ready(function() { 
    // All other loading items 
    $("#loadingMessage").hide(); 
}); 

请确保您将hide()函数作为最后一个,这样其他所有内容都会先载入。

+0

请务必正确设置#loadingMessage,默认情况下将显示设置为可见。 –

相关问题