How document.ready event is implemented in jQuery. I mean whether they have used defer(which does not work in old browser) option in script tag or they dynamically add script.
1 Answer
It uses feature detection and it defaults to window.onload if nothing better is supported:
http://jqueryjs.googlecode.com/svn/trunk/jquery/src/event.js
Scroll down to function bindReady() {:
readyevent is an implementation of the various events that the browsers offer to signal that the DOM (the basic structure of the page, but not yet all images and resources) has been loaded. It works in all browsers that jQuery supports, so there is no need to worry about compatibility."bindReady:").