开发者

Start jquery script after whole page has loaded?

开发者 https://www.devze.com 2023-01-19 01:07 出处:网络
How do 开发者_Go百科I prevent my jQuery script from running until the whole page is loaded? (Including images .. ).

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

精彩评论

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