开发者

Start jquery script after whole page has loaded?

How do 开发者_Go百科I prevent my jQuery script from running until the whole page is loaded? (Including images .. ).

Thanks!


Instead of $(document).ready(/* ... */); you can use:

$(window).load(
    function() {

});

Or you could just put a script block at the bottom of the page, so by the time the scripts are reached the rest of the DOM's loaded already.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜