Archive

- Posts Tagged ‘YUI3’

YUI3 Tutorial: Working with Node – 2. Dynamically Add, Remove and Toggle CSS Class

Here is another post for YUI3 Node. Here I am going to present examples for adding Class, removing class and toggle css class dynamically using YUI. YUI3 provides .addClass('foo'), .removeClass('foo'), .toggleClass('foo'), .hasClass('foo') and .replaceClass('foo', 'bar') for dynamically working with class on an element. Javascript used in the example: YUI().use('node', function(Y)… (Continue)

YUI3 Tutorial: YUI Node with Examples – 1

YUI has a node utility for creating, collecting and manipulating node. Each node represent DOM node. It helps in managing style, subscribing to events, and dynamically loading content and many more things. We can use Y.one() for single node, Y.all() for multiple node (nodeList) and node.one(), which is same as… (Continue)

YUI3 Overlay – Working Example with Code

Here is fourth post about YUI. It will result in Facebook like draggable floating div using YUI3. Earlier post about YUI3 were Learn YUI3, Learn YUI3: Playing with Events and Putting Callbacks, Learn YUI3: Attach Event to Dynamic Content. This post is regarding Overlay using YUI3. This a how the… (Continue)

Learn YUI3: Attach Event to Dynamic Content

How would you attach event to dynamically generated content such as li, div? Many elements are dynamically created based on user action. Something like search result, carousel, or other kind of tool where you have next, prev button generally add content dynamically to the container. Usually one may thing of… (Continue)

Learn YUI3: Playing with Events and Putting Callbacks

This is 2nd one in the series of YUI3 learning. Previous one in the tutorial was about node, how to access node and its properties in YUI3. I have also shown examples of domready events there. Use of Events are very common in JavaScript programming. OnClick and Hover is the… (Continue)