TIMEX TIMEX - 1 year ago 71
jQuery Question

What is the non-jQuery equivalent of '$(document).ready()'?

What is the non-jQuery equivalent of


Answer Source

The nice thing about $(document).ready() is that it fires before window.onload. The load function waits until everything is loaded, including external assets and images. $(document).ready, however, fires when the DOM tree is complete and can be manipulated. If you want to acheive DOM ready, without jQuery, you might check into this library. Someone extracted just the ready part from jQuery. Its nice and small and you might find it useful:

domready at Google Code

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download