• Register
  • Log In
  • Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • API Docs
    • Environments
    • Tutorials
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • Shifter »
    • Yogi »
    • YUI 2
    • YUI Doc »
    • YUI Test
    • YUI Website
    • YUI Compressor »
    • YUI Builder »
    • YUI PHP Loader
    • Grid Builder »
    • Skin Builder »
  • YUI
  • >
  • Community
  • >
  • Gallery

Gallery

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • Yogi Documentation
  • Shifter Documentation
  • Developer Guide
  • Module Setup

Tag Cloud

Context Navigation

    YUI Library is not responsible for bugs or support with this module. It is available as a free service. For support please contact the module owner with the provided links.

    Animation Sequence (gallery-anim-sequence) on cdn

    Last Updated: 04/7/13
    + 0 -

    John Lindal

    YUI Contributor

    See 50 more by this user.

    Created: 06/30/12
    Last CDN Push: 07/25/12
    Build Tag: gallery-2012.07.25-21-36
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.5.1
    Free for use.

    Manages a sequence of animations, so you don't have to chain them manually. Each item in the sequence can be a single animation, an array of animations to perform in parallel, an immediate action, or a delay.

    • Tags:
    • jafl
    • animation
    • anim
    • sequence
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Example of how to use Y.AnimSequence and Y.Plugin.NodeFXSequence

    Code Sample

    <script src="http://yui.yahooapis.com/3.5.1/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2012.07.25-21-36'
    }).use('gallery-anim-sequence', function(Y)
    {
        // sequence animating multiple nodes
     
        var s1 = new Y.AnimSequence(
        {
            sequence:
            [
                [
                    new Y.Anim({ node: '#a', from: { top: 0 }, to: { top: '100px' } }),
                    new Y.Anim({ node: '#b', from: { top: 0 }, to: { top: '-100px' } })
                ],
                [
                    new Y.Anim({ node: '#a', from: { backgroundColor: '#FFFFFF' }, to: { backgroundColor: '#FF0000' } }),
                    new Y.Anim({ node: '#b', from: { backgroundColor: '#FFFFFF' }, to: { backgroundColor: '#0000FF' } })
                ],
                new Y.Anim({ node: '#ab', from: { backgroundColor: '#FFFFFF' }, to: { backgroundColor: '#999999' } })
            ]
        });
     
        s1.run();
     
        // node plugin
     
        var n1 = Y.one('#my-node');
        n1.plug(Y.Plugin.NodeFXSequence,
        {
            sequence:
            [
                new Y.Anim({ from: { backgroundColor: '#FFFFFF' }, to: { backgroundColor: '#FF0000' } }),
                new Y.Anim({ from: { height: '20px' }, to: { height: '50px' } }),
                new Y.Anim({ from: { backgroundColor: '#FF0000' }, to: { backgroundColor: '#00FF00' } })
            ]
        });
     
        n1.fx.run();
    });

    © 2006-2013 Yahoo! Inc. All rights reserved.
    All code on this site is licensed under the BSD License unless stated otherwise.
    About This Site · Security Contact Info