Document.ready() function is completely different from body onload() function .
jQuery waits until DOM tree is ready before executing scripts. jQuery uses this approach using Document.Ready . This makes running scripts fast. jQuery triggers execution of code once the DOM tree is loaded , but not external image resources has loaded. Hence script execution need not wait till the page is loaded. The code execution happens before page is loaded hence jQuery code is faster. We can use this technique multiple times within the same HTML document.
To summarize the differences
Tags: BRH, jQuery, jquery faq, document.ready, onload(), jQueryinterview questions, dom,