src/aria/utils/css/Effects.js
function (htmlElem, properties, cfg) {
                var animId;
                cfg = cfg || {};
                var elem = this._getHTMLElement(htmlElem), animInfo = {
                    props : []
                };
                if (elem == null) {
                    this.$logWarn(this.INVALID_HTML_ELEMENT);
                    return null;
                }
                animInfo.duration = cfg.duration ? parseInt(cfg.duration, 10) : this.DEFAULT_DURATION;
                animInfo.interval = cfg.interval ? parseInt(cfg.interval, 10) : this.DEFAULT_INTERVAL;
                if (cfg.easing != null) {
                    if (ariaUtilsType.isFunction(cfg.easing)) {
                        animInfo.easing = cfg.easing;
                    } else if (ariaUtilsType.isString(cfg.easing)) {
                        animInfo.easing = this._easing[cfg.easing];
                    }
                }
                animInfo.easing = animInfo.easing || this._easing[this.DEFAULT_EASING];
                animInfo.queue = (cfg.queue === true) ? this.DEFAULT_QUEUE_KEY : (cfg.queue != null)
                        ? this._getQueueKey(cfg.queue)
                        : false;
                animInfo.element = elem;
                animInfo.userProperties = properties;
                animInfo.onStartAnimation = cfg.onStartAnimation;
                animInfo.onEndAnimation = cfg.onEndAnimation;
                animInfo.onEndQueue = cfg.onEndQueue;
                animInfo.hide = cfg.hide;

                if (animInfo.queue) {
                    // if it is the first animation of its queue
                    if (!this.queues[animInfo.queue]) {
                        this.queues[animInfo.queue] = {
                            list : [animInfo],
                            onEndQueue : cfg.onEndQueue
                        };
                        this.$callback(cfg.onStartQueue);
                        animId = this._createAndLaunchAnimation(animInfo);
                    } else {
                        animId = this._createAnimationSpot();
                        this.queues[animInfo.queue].list.push(animInfo);
                    }
                } else {
                    animId = this._createAndLaunchAnimation(animInfo);
                }
                animInfo.animId = animId;
                this.animations[animId] = animInfo;

                return animId;
            }
function (htmlElem, properties, cfg) {
                var animId;
                cfg = cfg || {};
                var elem = this._getHTMLElement(htmlElem), animInfo = {
                    props : []
                };
                if (elem == null) {
                    this.$logWarn(this.INVALID_HTML_ELEMENT);
                    return null;
                }
                animInfo.duration = cfg.duration ? parseInt(cfg.duration, 10) : this.DEFAULT_DURATION;
                animInfo.interval = cfg.interval ? parseInt(cfg.interval, 10) : this.DEFAULT_INTERVAL;
                if (cfg.easing != null) {
                    if (ariaUtilsType.isFunction(cfg.easing)) {
                        animInfo.easing = cfg.easing;
                    } else if (ariaUtilsType.isString(cfg.easing)) {
                        animInfo.easing = this._easing[cfg.easing];
                    }
                }
                animInfo.easing = animInfo.easing || this._easing[this.DEFAULT_EASING];
                animInfo.queue = (cfg.queue === true) ? this.DEFAULT_QUEUE_KEY : (cfg.queue != null)
                        ? this._getQueueKey(cfg.queue)
                        : false;
                animInfo.element = elem;
                animInfo.userProperties = properties;
                animInfo.onStartAnimation = cfg.onStartAnimation;
                animInfo.onEndAnimation = cfg.onEndAnimation;
                animInfo.onEndQueue = cfg.onEndQueue;
                animInfo.hide = cfg.hide;

                if (animInfo.queue) {
                    // if it is the first animation of its queue
                    if (!this.queues[animInfo.queue]) {
                        this.queues[animInfo.queue] = {
                            list : [animInfo],
                            onEndQueue : cfg.onEndQueue
                        };
                        this.$callback(cfg.onStartQueue);
                        animId = this._createAndLaunchAnimation(animInfo);
                    } else {
                        animId = this._createAnimationSpot();
                        this.queues[animInfo.queue].list.push(animInfo);
                    }
                } else {
                    animId = this._createAndLaunchAnimation(animInfo);
                }
                animInfo.animId = animId;
                this.animations[animId] = animInfo;

                return animId;
            }
function ( htmlElem , properties , cfg ) { var animId ; cfg = cfg || { } ; var elem = this . _getHTMLElement ( htmlElem ) , animInfo = { props : [ ] } ; if ( elem == null ) { this . $logWarn ( this . INVALID_HTML_ELEMENT ) ; return null ; } animInfo . duration = cfg . duration ? parseInt ( cfg . duration , 10 ) : this . DEFAULT_DURATION ; animInfo . interval = cfg . interval ? parseInt ( cfg . interval , 10 ) : this . DEFAULT_INTERVAL ; if ( cfg . easing != null ) { if ( ariaUtilsType . isFunction ( cfg . easing ) ) { animInfo . easing = cfg . easing ; } else if ( ariaUtilsType . isString ( cfg . easing ) ) { animInfo . easing = this . _easing [ cfg . easing ] ; } } animInfo . easing = animInfo . easing || this . _easing [ this . DEFAULT_EASING ] ; animInfo . queue = ( cfg . queue === true ) ? this . DEFAULT_QUEUE_KEY : ( cfg . queue != null ) ? this . _getQueueKey ( cfg . queue ) : false ; animInfo . element = elem ; animInfo . userProperties = properties ; animInfo . onStartAnimation = cfg . onStartAnimation ; animInfo . onEndAnimation = cfg . onEndAnimation ; animInfo . onEndQueue = cfg . onEndQueue ; animInfo . hide = cfg . hide ; if ( animInfo . queue ) { // if it is the first animation of its queue if ( ! this . queues [ animInfo . queue ] ) { this . queues [ animInfo . queue ] = { list : [ animInfo ] , onEndQueue : cfg . onEndQueue } ; this . $callback ( cfg . onStartQueue ) ; animId = this . _createAndLaunchAnimation ( animInfo ) ; } else { animId = this . _createAnimationSpot ( ) ; this . queues [ animInfo . queue ] . list . push ( animInfo ) ; } } else { animId = this . _createAndLaunchAnimation ( animInfo ) ; } animInfo . animId = animId ; this . animations [ animId ] = animInfo ; return animId ; }
Starts the animation
@param {HTMLElement|String} element to be animated (or its id)
@param {Object} CSS properties
@param {Object} cfg animation configuration
@return {String} animation ID
Starts the animation