Archive

Posts Tagged ‘YUI3’

YUI Seed Files – yui.js, yui-base.js and yui-core.js – YUI3 Tutorial

Jan 27th, 2012

YUI3 has three kind of seed files: yui.js, yui-base.js and yui-core.js. In this you may have used yui.js file always.
(<script src=”http://yui.yahooapis.com/3.4.1/build/yui/yui-min.js”></script>)
I just thought to read about other kind of seed files and its pros and cons. YUI main seed file (YUI.js) includes loader (dynamically load missing modules as… (Continue)

YUI3 Tutorial: YUI Attribute Selector. Working with Attribute Selector

Jan 11th, 2012

Here is a separate article on attribute selector. The attribute selector was not working in flexible way. I was facing problem is excluding some some tag based on attribute differences.
Here is the HTML snippet I was using and I will use here for Attribute selector example:
<a rel=”me” href=”http://newsviews.satya-weblog.com/”>My… (Continue)

Learn YUI3: Mouseover, Mouseout, Mouseenter and Mouseleave events with Examples

Jan 11th, 2012

These events (Mouseover, Mouseout, Mouseenter and Mouseleave) requires two modules:
1. event-hover module -
Adds a “hover” event which binds to two callbacks, one for the start, and one for the end of a mouse hover.
2. event-mouseenter module -
Adds “mouseenter” and “mouseleave” events.
Mouseenter and mouseleave is similar… (Continue)

Learn YUI3: Accessing Attributes of Element and changing it

Jan 10th, 2012

Here we will play with element’s attribute. We will access attributes and change it. It is a part of YUI node learning series.

<img class=”hotels” src=”Marina-Bay-Sands_222812.jpg” widht=”310″ height=”207″ />
<button id=”bttnImg”>Change Image attributes (src, width and height)</button>

Y.one(‘#bttnImg’).on(‘click’, function(e) {

var hotels = Y.all(‘.hotels’);

// get first one and start… (Continue)

Learn YUI3 – Create new Element/Node and Apply CSS

Jan 6th, 2012

I am continue on learning YUI and posting it here for all to read as part of YUI3 tutorial. This post is a part of YUI node under YUI tutorial series.
Creating new Element using YUI3:
The below example will create DIV, SPAN and P and present different different scenarios.… (Continue)

Learn YUI3: Working with Node – Part 2. AddClass, RemoveClass, ToggleClass, …

Jan 5th, 2012

Here is second article on YUI3 node series. This article is going to talk about addClass, removeClass, toggleClass, replaceClass and hasClass.

We will need HTML to work with. So here is the HTML that is used for example JavaScript code using YUI3.

Example- Dynamically assigning class, toggle class etc
<div… (Continue)

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

Dec 21st, 2011

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

Dec 21st, 2011

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)

Learn YUI3 – What is Widget in YUI3 and Know common Attributes and Interfaces in Widget

Dec 14th, 2011

You may like to read this article on YUI3 related to plugins, extension and widget before reading this.
This article is mostly scraped but shorten version of the article from the YUI article on Widget. I have published it here so that you read this before reading any widget related… (Continue)

Learn YUI3: Difference between Plugin and Widget. Extensions!

Dec 9th, 2011

I was reading an article and read about plugin. I came to know that plugin exists in YUI3. Then the question come to my mind what to do with plugins in YUI3. Widget are already there.

As I read here, Plugins are for atomic functionality and not for a set… (Continue)

Mobify empowers marketers and developers to create amazing mobile web experiences. Tap to learn more

Mobify