onDOMLoad Demo Page
Normally my functions must wait for the whole Page to load
But now they can be activated when the DOM is loaded
So your pages can run faster
The best bit...
It really is easy to implement this.
All you need to do is download onDOMLoad_min.js to your server, then put code like the following in your page.
<script src="onDOMLoad_min.js"> </script>
function myFunc(msg){
alert("this is my function: " + msg);
}
onDOMLoad(myFunc);
onDOMLoad(function(){myFunc.call(document,"a variable to pass");});
NB: the above downloadable code has been minifed using compressorrater to less that 1K..!
To get the fully documented and readable version, download onDOMLoad.js
Dean Edwards wrote a test page that I liked, so I copied it...