Jquery $(document).ready vs $(window).load

document.ready will execute after all HTML of the page is loaded.

window.load will wait for all elements are loaded, include image, iframe. window.load can be used in body onload.

$(document).ready will trigger before $(window).load. Use window.load when you want retrieve attribute of image, iframe on page start.

Bookmark the permalink. RSS feed for this post.

Search

Swedish Greys - a WordPress theme from Nordic Themepark. Converted by LiteThemes.com.