//$document.ready function event executes earlier than window.onload. DOM present before images
$( document ).ready(function() {
console.log( "I'm faster" );
});
//Windows load event trigger only when all contents fully loaded, including DOM
// Useful for DFP unit, wait till its present then fired.
$(window).load(function() {
console.log( "I'm patient" );
});