DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Saul has posted 2 posts at DZone. View Full User Profile

YUI - Determine When The DOM Is Ready To Be Safely Used.

03.12.2010
| 2360 views |
  • submit to reddit
        
<script type="text/javascript">
  // Remember to include:    .../build/yahoo-dom-event/yahoo-dom-event.js
  YAHOO.example.init = function()
  {
    // Init stuff Here
    var myAutoComp = new YAHOO.widget.AutoComplete("myInput","myContainer", myDataSource);
  };
  YAHOO.util.Event.onDOMReady(YAHOO.example.init);
</script>