I had been researching on the above 3 JS/jQuery commands and I want to execute the JavaScript after EVERYTHING is loaded, but seems all the above 3 scripts are fired before the DIV is loaded. Can anyone tell me how to execute a JS script after EVERYTHING is loaded. Please see the following html : If you carefully notice this, you will see the alert pop up window before the DIV is loaded. I am running it in Chrome.
<script>
window.addEventListener( 'load', function( event ) {
alert("test");
});
$(document).ready(function(){
alert("test");
});
window.onload = function(e){
alert("test");
}
</script>
<body>
<div>
Hello There!!!
</div>
</body>