how did jquery implement $(document).ready()?

前端 未结 3 1845
花落未央
花落未央 2021-02-03 13:01

how did jquery implement $(document).ready()?

of course I can read the code, but I am looking for the concept...

3条回答
  •  生来不讨喜
    2021-02-03 14:06

    It tests if document.body does not evaluate to something falsy: http://james.padolsey.com/jquery/#v=1.5.0&fn=jQuery.ready

提交回复
热议问题