Difference between Javascript Body.OnLoad and jQuery document.ready() Event?

Body.Onload() event will be called only after the DOM and associated resources like images got loaded. Only one Body.Onload() event can be include in a page.

jQuery’s document.ready() event will be called once the DOM is loaded. It will get executed once the HTML structure is loaded without waiting for the resources. Multiple document.ready() can be include in a page.

Leave a Reply

Your email address will not be published. Required fields are marked *