how did jquery implement $(document).ready()?
$(document).ready()
of course I can read the code, but I am looking for the concept...
In general, It checks if the browser already loaded the body element to the DOM tree, in that case it executes the cb() without waiting for the other requests(images...)
otherwise it waits sometime and recheck..