The example HTML structure is an outer div that holds all of the panels. Then, each panel is just a
couple of DIVs (one for the header and one for the content) wrapped in an outer DIV. You can actually use
elements other than divs.
<div id="tabContainer">
<div id="panelHeaders">
<div id="Header1">
Overview
</div>
</div>
<div id="panelContents">
<div id="Content1">
... content text ...
</div>
</div>
</div>
To attach the tabbed panel behavior to the tabbed panel container div, construct a Rico.TabbedPanel
object and pass the panel titles and contents to it. With the Prototype Selector class it is very easy.
new Rico.TabbedPanel( $$('div.panelheader'), $$('div.panelContent') );
-or-
new Rico.TabbedPanel( $$('div.panelheader'), $$('div.panelContent'),
{panelHeight : 200,
hoverClass : 'mdHover',
selectedClass: 'mdSelected'} );
The second example specifies the height of the panels and the css classes that can be associated
with the tabbed panel behaviors.
There are many other configuration parameters that can be specified to modify various visual aspects of the
tabbed panel. The panelHeight is the attribute that is most commonly overridden.