Asked 7 years ago
23 Jan 2017
Views 1092
sandee

sandee posted

difference between window.onload and $(document).ready() ?

what is the difference between window.onload (JavaScript) and $(document).ready() (jQuery) ?

is there $(document).ready() is that extended version of window.load ?

which is one better to use when we need some action in JavaScript after page loading.
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00

window.load is JavaScript function and $(document).ready() is jQuery function

$(document).ready() is almost all browser compatible in respect to window.load
Post Answer