$.ready() before closing body

前端 未结 3 1938
终归单人心
终归单人心 2021-02-14 13:21

This is not a real coding question, more of a real-world statement.

I have previously noted that DOMReady events are slow, very slow. So, I noticed while br

3条回答
  •  死守一世寂寞
    2021-02-14 13:50

    By triggering the event yourself, you are stating to your ready() handlers that your dom has been loaded BUT it may not have been! There is no short cutting the DOM ready event. If there is indeed a long wait time, then employ the amazing debugging tools of firebug, chrome, etc.... check your resources and their timing ques. It's all there in black and white and will indicate what is taking so long (the requests, the rendering, how many resources, etc.. )

提交回复
热议问题