When does document.ready actually fire?

后端 未结 4 745
野性不改
野性不改 2020-12-11 02:38

Let\'s consider the following case:

There is a 2.5MB image in an tag and I\'m on a slow connection which takes considerable time to download

4条回答
  •  庸人自扰
    2020-12-11 02:57

    Everything inside $(document).ready() will load as soon as the DOM is loaded and before the page contents (html) are loaded.

提交回复
热议问题