how did jquery implement $(document).ready()?
$(document).ready()
of course I can read the code, but I am looking for the concept...
It tests if document.body does not evaluate to something falsy: http://james.padolsey.com/jquery/#v=1.5.0&fn=jQuery.ready
document.body