onload vs jquery $(document).ready which one trigger first
jQuery offers the (window).load() function for this, which executes a bit later than ( document).ready(). A few large image files will quickly reveal that window.onload() can be painfully slow . jQuerys document.ready event executes already when the HTML-Document is loaded and the DOM is ready, even if all the graphics havent loaded yet . document.ready is a function of jquery library. document.ready trigger when html and all js, css, images which included in html file completely loadedwindow.