This example remembers the panel you had open the last time you visited. Simply provide a value for options.cookieName. This option also applies to tabbed panels. By default, the cookie value is only remembered for the current session. To have it persist longer, also set options.cookieDays.
<div id="accordionDiv"> <div id="overviewPanel"> <div id="overviewHeader"> Overview </div> <div id="panel1Content"> ... content text ... </div> </div> </div>
new Rico.Accordion( $$('div.panelheader'), $$('div.panelContent') ); -or- new Rico.Accordion( $$('div.panelheader'), $$('div.panelContent'), {panelHeight:200, hoverClass: 'mdHover', selectedClass: 'mdSelected'}} );The second example specifies the height of the accordion panels and the css classes that can be associated with the accordion behaviors. There are many other configuration parameters that can be specified to modify various visual aspects of the accordion. The panelHeight is the attribute that is most commonly overridden.