window.onload vs document.onload

window.onload It is fired when the entire page loads, includ­ing its con­tent (images, css, scripts, etc.) $(window).load() document.onload It is fired when the DOM is ready which can be prior to images and other…