JavaScript (YUI2 and YUI3) skeleton code
YUI2
// assuming we've already included this library:
// http://yui.yahooapis.com/combo?2.8.1/build/yahoo-dom-event/yahoo-dom-event.js
// and that this script is run after all DOM markup required by the code
(function () {
var Y = YAHOO,
YU = Y.util;
YU.Event.onDOMReady(function () {
// This function will be executed as a callback once the DOM is completely ready
});
})();
YUI3
YUI().use('*', function (Y) {
Y.on("domready", function () {
// the DOM is now fully available
}, Y);
});
About this entry
You’re currently reading “JavaScript (YUI2 and YUI3) skeleton code,” an entry on DJWortham
- Published:
- 2010/09/15 / 10:40 am
- Category:
- Web Development
- Tags:
- domready, JavaScript, JS, onDOMReady, YUI, YUI2, YUI3
No comments yet
Jump to comment form | comment rss [?] | trackback uri [?]