YUILibrary - Open source JavaScript and CSS for building richly interactive software.
Fork YUI on GitHub
  • Home
  • Gallery
  • Forums
  • YUI 2
  • YUI 3
  • YUI Compressor
  • YUI Doc
  • More
  • Gallery Forums
  • Gallery Stats
  • Gallery Calendar
  • Register
  • Login

Modules

  • Home
  • Featured
  • Popular
  • New
  • All

Documentation

  • FAQ
  • Developer FAQ
  • Developer Guide
  • Module Setup

Tag Cloud

animation lsmith node port adam plugin jsonp ericf foxxtrot apipkin overlay filter jafl yui2 html5 davglass caridy rgrove nzakas skinnable widget ajax slideshow event io form

Context Navigation

    Build Tag: gallery-2009.10.27

    Return to Accordion

    <script src="http://yui.yahooapis.com/3.1.0/build/yui/yui-min.js"></script>
    YUI({
        //Last Gallery Build of this module
        gallery: 'gallery-2010.06.09-20-45'
    }).use('gallery-accordion', function(Y) {
        var item1, item2, item3, accordion;
     
        accordion = new Y.Accordion({
            srcNode: "#acc1",
            useAnimation: true,
            collapseOthersOnExpand: true
        });
     
        accordion.render();
     
        item1 = new Y.AccordionItem( {
            label: "Item1, added from script",
            expanded: true,
            id: "dynamicItem1",
            contentHeight: {
                method: "fixed",
                height: 80
            },
            closable: true
        } );
     
        item1.set( "bodyContent", "This is the body of the item, added dynamically to accordion.<br>Content height has been set as \"fixed, 80px\"." );
     
        accordion.addItem( item1 );
     
        item2 = new Y.AccordionItem( {
            label: "Item2, added from script",
            expanded: true,
            id: "dynamicItem2",
            contentHeight: {
                method: "stretch"
            }
        } );
     
        item2.set( "bodyContent", "This is the body of the item, added dynamically to accordion, before item1.<br>Content height has been set as \"stretch\"." );
     
        accordion.addItem( item2, item1 );
     
        item3 = new Y.AccordionItem( {
            label: "Item3, added from script",
            expanded: true,
            alwaysVisible: true,
            id: "dynamicItem3",
            contentHeight: {
                method: "auto"
            }
        } );
     
        item3.set( "bodyContent", "<div style='position:relative;'>This is the body of the item, added dynamically to accordion.<br>Content height has been set as \"auto\".</div>" );
     
        accordion.addItem( item3 );
     
    });

    Build Output

    /home/y/libexec/ant/bin/ant all
    Buildfile: build.xml
         [echo] Starting Build For gallery-accordion
         [echo] Ant Properties
         [echo]     Home : /home/y/libexec/ant
         [echo]     Ant Version : Apache Ant version 1.7.1 compiled on June 27 2008
         [echo]     Build File : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build.xml
         [echo] Local Build Properties
         [echo]     version : 3
         [echo]     srcdir : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery
         [echo]     builddir : ../../../builder/componentbuild
         [echo]     component : gallery-accordion
         [echo]     component.basefilename : gallery-accordion
         [echo]     component.basedir : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion
         [echo]     component.builddir : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp
         [echo] Global Build Properties
         [echo]     global.build.base : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/build
         [echo]     global.build.component : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/build/gallery-accordion
         [echo]     global.build.component.assets : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/build/gallery-accordion/assets
    
    clean:
    
    init:
        [mkdir] Created dir: /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp
    
    -concatdebug:
         [echo] Concatenating
         [echo]     Source Files : gallery-accordion.js gallery-accordion-item.js
         [echo]     In Source Dir : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/js
         [echo]     To : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/gallery-accordion-debug.js
         [copy] Copying 2 files to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/ant
       [delete] Deleting directory /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/ant
    
    -registerdebug:
         [echo] Wrapping /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/gallery-accordion-debug.js in YUI.add module
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp
    
    -prependdebug:
    
    -appenddebug:
    
    builddebug:
    
    -createcore:
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp
    
    -loggerregex:
         [echo] Replacing Logger Statements in /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/gallery-accordion.js
    
    buildcore:
    
    -rollupjs:
    
    -concatskins:
         [echo] Concatenating
         [echo]     Source Files : gallery-accordion-core.css, skins/sam/gallery-accordion-skin.css
         [echo]     In Source Dir : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/assets
         [echo]     To : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/assets/skins/sam/gallery-accordion.css
         [copy] Copying 2 files to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/ant
       [delete] Deleting directory /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/ant
         [echo] Running yuicompressor on /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/assets/skins/sam/gallery-accordion.css
         [java] 
         [java] [INFO] Using charset UTF-8
    
    -buildskins:
    
    -rollupcss:
    
    buildskins:
    
    build:
    
    minify:
         [echo] Running yuicompressor on /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/gallery-accordion.js
         [java] 
         [java] [INFO] Using charset UTF-8
         [java] 
         [java] [WARNING] Found an undeclared symbol: YUI
         [java]  ---> YUI <--- .add("gallery-accordion",function(Y){
    
    lint:
         [java] Running JSLint on : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/gallery-accordion-debug.js
         [java] - OK
         [java] Running JSLint on : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/gallery-accordion-min.js
         [java] - OK
         [java] Running JSLint on : /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/src/gallery-accordion/build_tmp/gallery-accordion.js
         [java] - OK
    
    local:
    
    deploybuild:
         [copy] Copying 3 files to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/build/gallery-accordion
    
    deployassets:
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/build/gallery-accordion/assets
    
    deployskins:
         [copy] Copying 1 file to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/build/gallery-accordion/assets/skins/sam
         [copy] Copying 4 files to /home/y/var/builds/workspace/gallery-test/build_tmp/src/yui3-gallery/build/gallery-accordion/assets/skins/sam
    
    deploydocs:
    
    deploy:
    
    all:
    
    BUILD SUCCESSFUL
    Total time: 6 seconds
    YUI Projects
    • All YUI Downloads
    • YUI 2
    • YUI 3
    • YUI Doc
    • YUI Compressor
    • YUILibrary.com
    • YUI Build Tool
    • YUI PHP Loader
    Pages & Links
    • All YUI Downloads
    • Git FAQ
    • Graded Browser Support
    • Contribute to YUI
    • Forum Stats
    • Gallery Stats
    • YUI Calendar
    Contribute
    • Submit a Bug
    • Request a Feature
    • Write Code
    • Meet the Team
    Follow YUI
    • on GitHub
    • on Twitter
    • on FriendFeed
    • on Facebook
    • on IRC
    • YUI Blog
    • YUI Theater
    • YUI Forums

    © 2010 YUI Library - Site Credits