• 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.

    Node Accordion (gallery-node-accordion) on cdn

    Last Updated: 01/20/11
    + 16 -

    Caridy Patino

    YUI Contributor

    See 11 more by this user.

    Featured Item

    Created: 10/27/09
    Last CDN Push: 03/2/11
    Build Tag: gallery-2011.03.02-20-58
    Project: YUI 3
    License: YUI BSD
    YUI Version: 3.3.0
    Free for use.
    Module Image

    Overview

    The Accordion Node Plugin makes it easy to transform existing markup into an accordion element with expandable and collapsible elements. Elements are easy to customize, and only require a small set of dependencies.

    To use the Accordion Node Plugin, simply pass a reference to the plugin to a Node instance's plug method.

    Usage

    // Call the "use" method, passing in "gallery-node-accordion". This will 
    // load the script and CSS for the Accordion Node Plugin and all of
    // the required dependencies.
    YUI().use("gallery-node-accordion", function(Y) {
    // Use the "contentready" event to initialize the accordion when
    // the element that represente the accordion
    // (<div id="accordion1">) is ready to be scripted.
    Y.on("contentready", function () {
    // Callback scope will be a Node instance for (<div id="accordion1">).
    // Therefore, since "this" represents a Node instance, it
    // is possible to just call "this.plug".
    this.plug(Y.Plugin.NodeAccordion);
    }, "#accordion1");
    });

    The Accordion Node Plugin has several configuration properties that can be set via an object literal that is passed as a second argument to a Node instance's plug method.

    // Including animation module to support smooth transitions 
    YUI().use("gallery-node-accordion", "anim", function(Y) {
    // Passing a second argument to customize some attributes
    Y.one('#accordion2').plug(Y.Plugin.NodeAccordion, {
    anim: true,
    effect: Y.Easing.backIn
    });
    });

    It also has several configuration properties that can be set via an object literal that is passed as a second argument to a Node instance's plug method. More attributes and other details here:

    • http://caridy.github.com/api/gallery-node-accordion/plugin.NodeAccordion.html

    Examples

    • [http://caridy.github.com/examples/gallery-node-accordion/accordion-with-skin.html Accordion using the default skin + Easing animation]
    • [http://caridy.github.com/examples/gallery-node-accordion/custom-style.html Custom skin + custom properties]
    • [http://caridy.github.com/examples/gallery-node-accordion/horizontal.html Horizontal Accordions (beta)]
    • [http://caridy.github.com/examples/gallery-node-accordion/accordion-mouseenter-mouseleave.html Accordion using synthetic events (mouseenter/mouseleave) to expand and collapse elements]

    Tests

    Run this test in your browser and report any issue.

    • http://caridy.name/sandbox/yui3-gallery/src/gallery-node-accordion/tests/node-accordion.html

    Note: Make sure you include OS, Browser Version and the test result from YUI Console in your ticket.

    CHANGELOG

    Check the latest changes in this module.

    • http://github.com/caridy/yui3-gallery/tree/master/src/gallery-node-accordion/
    • Tags:
    • caridy
    • accordion
    • plugin
    • Download
    • Docs
    • Homepage
    • Bugs
    • Source
    • Example
    • Forum
    • History

    Injecting node accordion plugin into a YUI 3 Node element.

    Code Sample

    <script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2011.03.02-20-58'
    }).use('gallery-node-accordion', function(Y) {
     
        Y.one("#myaccordion").plug(Y.Plugin.NodeAccordion);
     
    });

    Forum Posts

    Subject Author Date
    Node accordion - works in 3.0.0, not in 3.1.0 henk b 04/13/10
    Re: Node accordion - works in 3.0.0, not in 3.1.0 Caridy Patino 04/18/10
    Re: Node accordion - works in 3.0.0, not in 3.1.0 henk b 04/21/10
    Death by Firebug John Bercik 06/10/10
    Re: Death by Firebug Caridy Patino 06/10/10
    Show me '+' '-' sign, please? Will Xu 11/1/10
    Re: Show me '+' '-' sign, please? Caridy Patino 11/1/10
    Re: Show me '+' '-' sign, please? Will Xu 11/2/10
    Re: Node accordion - works in 3.0.0, not in 3.1.0 Bahnyen 11/22/10
    Re: Node accordion - works in 3.0.0, not in 3.1.0 Caridy Patino 11/22/10

    © 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