How do 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With