Yahoo! UI Library

animation  2.6.0

Yahoo! UI Library > animation > YAHOO.util.ColorAnim

Class YAHOO.util.ColorAnim - extends YAHOO.util.Anim

Known Subclasses:
YAHOO.util.Motion YAHOO.util.Scroll
Anim subclass for color transitions.

Usage: var myAnim = new Y.ColorAnim(el, { backgroundColor: { from: '#FF0000', to: '#FFFFFF' } }, 1, Y.Easing.easeOut); Color values can be specified with either 112233, #112233, [255,255,255], or rgb(255,255,255)

Constructor

YAHOO.util.ColorAnim ( el , attributes , duration , method )
Parameters:
el <HTMLElement | String> Reference to the element that will be animated
attributes <Object> The attribute(s) to be animated. Each attribute is an object with at minimum a "to" or "by" member defined. Additional optional members are "from" (defaults to current value), "units" (defaults to "px"). All attribute names use camelCase.
duration <Number> (optional, defaults to 1 second) Length of animation (frames or seconds), defaults to time-based
method <Function> (optional, defaults to YAHOO.util.Easing.easeNone) Computes the values that are applied to the attributes per frame (generally a YAHOO.util.Easing method)

Methods

parseColor

Array parseColor ( s )
Attempts to parse the given string and return a 3-tuple.
Parameters:
s <String> The string to parse.
Returns: Array
The 3-tuple of rgb values.

Events inherited from YAHOO.util.Anim:


Copyright © 2008 Yahoo! Inc. All rights reserved.