154
rated 0 times
[
159]
[
5]
/ answers: 1 / hits: 61651
/ 13 Years ago, mon, april 18, 2011, 12:00:00
Possible Duplicate:
$(document).ready equivalent without jQuery
I know you can use the window.onload event to make functions run, but is there a way for a script to query if the document is ready or not?
Something like
function update()
{
if( !document.ready() ) // don't do unless document loaded
return ;
}
window.setInterval( 'update();', 100 ) ;
Cannot change the <body> element, and no jQuery/other libraries.
More From » javascript