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.
精彩评论