Order of $(document).load() and $(document).ready() when deferring loading js

Try using

 $(window).load(function(){
 dosomething();
 });

It will run the js after the whole page is loaded.

Avoid using

$(document).ready(function(){
 dosomething();
 }); 

It will run the js just after the loading of DOM.

Leave a Comment

error code: 523