MultipleOpenAccordion
MooTools comes with a set of plugins including the excellent (if not overused) Accordion class. Here's one:
- first section
- I'm the content for the first section.
- second section
- I'm the content for the second section.
- third section
- I'm the content for the third section.
What if you want the user to be able to open more than one section?
At CNET, we sometimes use a similar effect for our navigation (on the left side of the site). While you could accomplish this with a set of height effects, I wanted to make it like an accordion so that implementing either one would be pretty much the same for a developer.
Here's an Accordion that lets you toggle individual areas open and shut:
- first section
- I'm the content for the first section.
- second section
- I'm the content for the second section.
- third section
- I'm the content for the third section.
new MultipleOpenAccordion($('AccordionMulti'), { elements: $$('#AccordionMulti dd.stretcher'), togglers: $$('#AccordionMulti dt.stretchtoggle'), openAll: false });

As you can see, it's not quite the same concept as the Accordion class, but for something like a navigation area, where the user might prefer to open more than one, it's really easy to implement.
It has numerous options, so be sure to see the docs.
cnet-libraries/08-layout/02.1-multipleopenaccordion.txt · Last modified: 2008/11/17 23:25