is the DOM ready yet?

This post ( Order of Events @ dean.edwards.name) addresses the need for a better solution than window.onload for DOM scripting. window.onload only fires after all the content on a page (including images) has loaded.. which is frequently significantly after the page has appeared in the browser. Mozilla/Firefox apparenly have the little known “DOMContentLoaded” event. Very handy. Windows IE has the readyState (or, better, the also little known ondocumentready event. Take this and brothercake’s domFunction and there’s a cross-browser solution in there awaiting the motivated developer.