The main difference is that document.ready() event gets called as soon as your DOM is loaded. It does not wait for the contents to get loaded fully, while window.onload will wait until all your contents are loaded fully
We can have more than one document.ready() function in a page where we can have only one onload function.
No comments:
Post a Comment