| Document.ready() | onload() |
|---|---|
| Jquery | Normal JS function |
| calls as soon as DOM id loaded | calls when everything gets loaded on the page that includes DOM, images and all associated resources of the page |
| We can have as many as document.ready() | onload function is limited on one time |
| Faster | slow compared to .ready() |
No comments:
Post a Comment