Actually thats a pretty good workaround for what I need. The issue is for me, I have asome code that simply will not work if the required HTML elements are not loaded when the code is executed. Its from SoundManager 2, and unfortunately it has its own, onload event, so I need this failsafe to stop those rare occasions when the page loads slower than usual.
On Dec 26, 7:19 am, Michal <[email protected]> wrote: > I'm not sure what you mean exactly, but do what about: > > var domReady = false; > window.addEvent('domready', function () { > domReady = true; > > }); > > Then you can just have > > if (domReady) { > // If dom is ready} else { > > // If dom is not ready > > } > > elsewhere in the code. > > In case this is not helpful and I have mis-understood, can I ask what > you need this for? > > Michal. > > On Dec 25, 6:05 pm, Kovo <[email protected]> wrote: > > > How could I check to see if 'domready' is complete? > > I almost have it, but just want to know if theres an easier way with > > mootools to check if dom is already ready > > > Meaning it would be checked after this event window.addEvent > > ('domready'....... > > > Thanks!
