Created
May 1, 2012 16:38
-
-
Save stlsmiths/2569489 to your computer and use it in GitHub Desktop.
yui2.9_loader.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>YUI Loader Usage</title> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<style type="text/css"> | |
/* define custom styles here */ | |
</style> | |
</head> | |
<body class=" yui-skin-sam"> | |
<script src="http://yui.yahooapis.com/2.9.0/build/yuiloader/yuiloader-min.js"></script> | |
<script type="text/javascript"> | |
var loader = new YAHOO.util.YUILoader({ | |
require: [ 'yuiloader-dom-event', 'fonts', 'base' , "datatable", "datasource", "connection", "json" ], | |
allowRollup : true, | |
loadOptional: true, | |
timeout: 5000, | |
combine: true, | |
// The function to call when all script/css resources have been loaded | |
onSuccess: function() { | |
// | |
// Aliases for YUI placeholders | |
// | |
var YDom = YAHOO.util.Dom, | |
YUtil = YAHOO.util, | |
YLang = YAHOO.lang, | |
YEvent = YAHOO.util.Event; | |
YAHOO.util.Event.onDOMReady( function() { | |
//========================== Put Your JS Code Here =================================== | |
//======================================================================================== | |
}); // end onDOMREady | |
} // end onSuccess | |
}); | |
loader.insert(); | |
</script> | |
<!-- Put your HTML markup stuff here ---> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment