<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>YUI Coder &#187; javascript</title>
	<atom:link href="http://www.yuicoder.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuicoder.com</link>
	<description>Manipulating the Yahoo User Interface to your will!</description>
	<lastBuildDate>Mon, 16 Aug 2010 22:52:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Using the YUI Loader and Yahoo&#8217;s CDN Rollup</title>
		<link>http://www.yuicoder.com/2009/03/using-the-yui-loader-and-yahoos-cdn-rollup/</link>
		<comments>http://www.yuicoder.com/2009/03/using-the-yui-loader-and-yahoos-cdn-rollup/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 21:07:04 +0000</pubDate>
		<dc:creator>Jeffrey Cobb</dc:creator>
				<category><![CDATA[YUI Loader]]></category>
		<category><![CDATA[YUI Mish Mash]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[FireBug]]></category>
		<category><![CDATA[Get]]></category>
		<category><![CDATA[HTML DOM]]></category>
		<category><![CDATA[init()]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[onDomReady]]></category>
		<category><![CDATA[Rollup]]></category>
		<category><![CDATA[Yahoo User Interface]]></category>
		<category><![CDATA[YUI Framework]]></category>

		<guid isPermaLink="false">http://www.yuicoder.com/?p=26</guid>
		<description><![CDATA[Using the YUI Loader and the script below will allow you to implement the YUI framework within your application with out downloading and installing the YUI framework to your server. var loader = new YAHOO.util.YUILoader({ require: ["get","dom","event"], loadOptional: true, onSuccess: function() { YAHOO.util.Event.onDOMReady(init); }, timeout: 10000, combine: true }); loader.insert(); function init(){ console.warn('YUI Loaded'); } [...]]]></description>
			<content:encoded><![CDATA[<p>Using the YUI Loader and the script below will allow you to implement the YUI framework within your application with out downloading and installing the YUI framework to your server.</p>
<pre name="code" class="JavaScript">
<script src="http://yui.yahooapis.com/2.7.0/build/yuiloader/yuiloader-min.js"></script>
<script> 
var loader = new YAHOO.util.YUILoader({
    require: ["get","dom","event"],
    loadOptional: true,
    onSuccess: function() {
    YAHOO.util.Event.onDOMReady(init);
    },
    timeout: 10000,
    combine: true
});
loader.insert();

function init(){
console.warn('YUI Loaded');
}
</script>
</pre>
<h3>Verify Installation:</h3>
<p>I have included a console function that will send a warning to your FireBug application telling you that everything has loaded correctly. If you run this code and see the warning message in your FireBug console, then your code is installed correctly.</p>
<h3>Adding your own code:</h3>
<p>Replace the following line with your code and your ready to run.</p>
<pre name="code" class="JavaScript">
console.warn('YUI Loaded');
</pre>
<h3>Adding resources from YUI:</h3>
<p>In order to use specific parts of the YUI framework you will need to request the files from the YUI CDN. To do this simply add the required YUI library to the require array as shown below.</p>
<pre name="code" class="JavaScript">
"require: ["get","dom","event","datatable","animation"],
</pre>
<h3>Things to remember</h3>
<p>
The YUI Loader may cause problems when working with older browsers such as IE6. Be sure to wrap you loader using the onDOMReady method like so.</p>
<pre name="code" class="JavaScript">
Yevent.onDOMReady(init);</pre>
<p>This will ensure that the browser has finished loading the DOM before firing off your scripts.</p>
<p> UPDATED (2009-07-22):  &#8220;missing > in code and removed Yevent shortcuts&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuicoder.com/2009/03/using-the-yui-loader-and-yahoos-cdn-rollup/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

