Archive for November 2009

Custom Modules in YUI 3

YUI 3 uses modules to group functionality and to only load what is used. This post describes how to create custom modules. The typical way modules are used is within the use() statement: YUI().use(‘node’, ‘event’, function(Y) { // your stuff here }); In the above example the modules node and event are loaded. Let’s see [...]

Instance and class based plugins in YUI 3

Using plugins in YUI 3 is a way to add functionality to existing objects in YUI (very much like you would use prototype to augment a function to a normal JavaScript object). Objects in YUI all derive from Y.Base. Note that this post is about YUI 3 and not YUI 2. However, the current YUI [...]