The document.ready() event occurs when all HTML documents have been loaded, but window.onload() occurs when all content (including images) has been loaded. So generally the document.ready() event fires first.
What’s the difference between document.ready() and window.onload()?
categories: jQuery