This is my "DOM Ready" function, any suggestions, I just tested it in IE 8, Chrome, and Opera. Seems to work 100%. Besides, it's pretty small compared to other similar functions I've seen.
Code:
function domReady(){if(document.body){
//Execute something
} else {
setTimeout("domReady()",10);
}
};
domReady();
The function is pretty simple, it loops each 10ms checking for
document.body. If it is defined then it executes something, else it keeps looping.
EDIT: I should'v posted this in the JavaScript snippets section....but...lol...