//Original $(document).ready(function()
{
alert("Hello");
});
//Shorthand for $(document).ready() $(function()
{
alert("Hello");
});
$(document).ready() will only run once the page Document Object Model (DOM) is ready for JavaScript code to execute.
Code included inside $(window).load(function() { ... }) will run once the entire page (images or iframes),not just the DOM.