Rico Nested Accordions

Base Library:

Overview

This example illustrates how to use the Rico.Accordion behavior to transform a set of divs into a first class accordion component.

Rico.Accordion is actually a very simple component built off of Rico behaviors and effects. It adds the necessary event handlers on the respective divs to handle the visual aspects of expanding, collapsing and hovering.
More Info (nested accordion)
Overview of ContentTransition base component
The Accordion derives from a base component that applies and manages behaviors and effects. The effects can be defined at the extended class. This approach results in a very flexible way of managing
Alternative HTML
Since the accordion does not parse the html, it can be constructed much looser than in previous versions. The base ContentTransition can be used to quicly build components such as tabs, master details, and many application specific behaviors. We will be providing examples of building your own soon.
Alternative effects
We will be discussing alternative transition effects here. Should be interesting.
Rico Code

To attach the accordion behavior to the accordion container div, construct a Rico.Accordion object and pass the id of the outer accordion div to it. Since there are two accordions in this example, we create two objects:
  new Rico.Accordion( 'OuterAccordion', 
                      { panelHeight : 200, 
                        selectedIndex : 1 });
  new Rico.Accordion( 'NestedAccordion', 
                      { panelHeight : 100 });
    
Panels are numbered starting with 0. The "selectedIndex:1" option ensures that the panel with the nested accordion is open by default.
Important Note

The accordion is very flexible. However, you do have to make sure the header and content elements are structured properly.