What are differences between
$(document).ready(function(){ //my code here });
and
$(window).load(function(){ //my code h
$(document).ready(function(e) { // executes when HTML-Document is loaded and DOM is ready console.log("page is loading now"); }); $(document).load(function(e) { //when html page complete loaded console.log("completely loaded"); });