Created
August 31, 2011 10:04
-
-
Save paulallies/1183224 to your computer and use it in GitHub Desktop.
YUI3 gallery-accordion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This file is used to illustrate initialization and use of the gallery-accordion visual widget | |
//Requires the following modules | |
requires: 'node', 'gallery-accordion' | |
//Declaration of Widget | |
var myAccordion = new Y.Accordion({ | |
srcNode: ".accordion", | |
useAnimation: true, | |
collapseOthersOnExpand: true | |
}); | |
//Render the accordion | |
myAccordion.render(); | |
//Selecting a accordion item with the index of 1 | |
var accordionitem = myAccordion.getItem(1); | |
accordionitem.set('expanded', true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment