Let\'s consider the following case:
There is a 2.5MB image in an tag and I\'m on a slow connection which takes considerable time to download
Everything inside $(document).ready() will load as soon as the DOM is loaded and before the page contents (html) are loaded.
$(document).ready()