the compact javascript framework
in partnership with mediatemple
Contains Accordion
MIT-style license.
Accordion.js | Contains Accordion |
Accordion | The Accordion class creates a group of elements that are toggled when their handles are clicked. |
Properties | |
addSection | Dynamically adds a new section into the accordion at the specified position. |
display | Shows a specific section and hides all others. |
The Accordion class creates a group of elements that are toggled when their handles are clicked. When one elements toggles in, the others toggles back. Inherits methods, properties, options and events from Fx.Elements.
The Accordion requires an XHTML doctype.
togglers | required, a collection of elements, the elements handlers that will be clickable. |
elements | required, a collection of elements the transitions will be applied to. |
options | optional, see options below, and Fx.Base options and events. |
show | integer, the Index of the element to show at start. |
display | integer, the Index of the element to show at start (with a transition). defaults to 0. |
fixedHeight | integer, if you want the elements to have a fixed height. defaults to false. |
fixedWidth | integer, if you want the elements to have a fixed width. defaults to false. |
height | boolean, will add a height transition to the accordion if true. defaults to true. |
opacity | boolean, will add an opacity transition to the accordion if true. defaults to true. |
width | boolean, will add a width transition to the accordion if true. defaults to false, css mastery is required to make this work! |
alwaysHide | boolean, will allow to hide all elements if true, instead of always keeping one element shown. defaults to false. |
onActive | function to execute when an element starts to show |
onBackground | function to execute when an element starts to hide |
Properties | |
addSection | Dynamically adds a new section into the accordion at the specified position. |
display | Shows a specific section and hides all others. |
Dynamically adds a new section into the accordion at the specified position.
toggler | (dom element) the element that toggles the accordion section open. |
element | (dom element) the element that stretches open when the toggler is clicked. |
pos | (integer) the index where these objects are to be inserted within the accordion. |
Documentation by Aaron Newton & Mootools Developers, generated by NaturalDocs and GeSHi