Skip to content Skip to sidebar Skip to footer

Javascript Dom Ready Without An Entire Framework

Does anyone know of a good javascript DOM ready library that I can use without loading an entire framework? I found one on google code that seems to work, but the library was post

Solution 1:

David Mark's "My Library" has a "DOM ready" functionality:

http://www.cinsoft.net/mylib.html

David is avid anti-framework, anti-bad-javascript-practice so it should be good quality code.

Solution 2:

Just do this right before the closing body tag:

<html><script>functionrunAfterLoad() {
}
... lots of stuff
</script><body>

... lots of stuff

<script>runAfterLoad();</script></body></html>

Solution 3:

Checkout Dean Edwards' base2. It contains a minimal amount of code necessary to patch up browser differences and provide nice consistent interface as per the standards. The gzipped version is only 6k.

Solution 4:

Use ded's domready

Solution 5:

It seems that the safest bet is indeed to use a javascript framework. I was able to find some small DOMready libraries - but nothing written recently or claiming to be confirmed working with the most current browser releases.

Post a Comment for "Javascript Dom Ready Without An Entire Framework"