<commit_before>h1. Prototype Accordion

"View the Prototype Accordion demo":http://homepage.mac.com/mattgarrett/prototype-accordion/

h2. Dependencies

* "Prototype":http://www.prototypejs.org
* "Scriptaculous Effects.js":http://script.aculo.us/

h2. Usage

<pre code="javascript">new Accordion('id');
var options = {
  classNames: {
    section: 'accordionSection',
    title: 'accordionTitle',
    toggle: 'accordionToggle',
    expanded: 'accordionExpanded'
  }
};
new Accordion('anotherId', options);</pre>

h2. Options

|_.Option|_.Default Value|_.Description|
|cancelEvent|true|When the title element is clicked, if this option is set to true, will cancel the event, therefore preventing the anchor to load a new page or modify the address bar.|
|classNames|{ section: 'section', title: 'title', toggle: 'toggle', expanded: 'expanded' }|Allows you to use custom CSS class names to describe the elements used.

* *section:* a CSS class on the element that contains the title and the toggle element.
* *title:* a CSS class on the element that is clicked to show or hide sections.
* *toggle:* a CSS class on the element that is to be shown or hidden when the title element is clicked.
* *expanded:* a CSS class that is on the section element when the section is expanded.|
|mutuallyExclusive|true|If this is set to false, multiple sections can be visible at the same time.|
|effectDuration| .3|The duration of the underlying BlindUp/BlindDown Scriptaculous effects.|

h2. Custom Events

The main Accordion class fires custom events that you can hook into.

|_.Accordion Custom Event Name|_.Description|_.Event Memo|
|id + ':initialized'|Fired when the class initializes.|Contains a reference to the accordion instance.|
|id + ':clicked'|Fired when a section title is clicked.|Contains a reference to the accordion instance.|

The AccordionSection class also fires custom events that you can hook into.

|_.AccordionSection Custom Event Name|_.Description|_.Event Memo|
|id + ':hidden'|Fired when a section is hidden.|Contains a reference to the accordion instance and the related section. Occurs at the end of the effect duration.|
|id + ':shown'|Fired when a section is shown.|Contains a reference to the accordion instance and the related section. Occurs at the end of the effect duration.|


<commit_msg>Elaborating on the classNames options.<commit_after>h1. Prototype Accordion

"View the Prototype Accordion demo":http://homepage.mac.com/mattgarrett/prototype-accordion/

h2. Dependencies

* "Prototype":http://www.prototypejs.org
* "Scriptaculous Effects.js":http://script.aculo.us/

h2. Usage

<pre code="javascript">new Accordion('id');
var options = {
  classNames: {
    section: 'accordionSection',
    title: 'accordionTitle',
    toggle: 'accordionToggle',
    expanded: 'accordionExpanded'
  }
};
new Accordion('anotherId', options);</pre>

h2. Options

|_.Option|_.Default Value|_.Description|
|cancelEvent|true|When the title element is clicked, if this option is set to true, will cancel the event, therefore preventing the anchor to load a new page or modify the address bar.|
|classNames|{ section: 'section', title: 'title', toggle: 'toggle', expanded: 'expanded' }|Allows you to use custom CSS class names to describe the elements used.|
|mutuallyExclusive|true|If this is set to false, multiple sections can be visible at the same time.|
|effectDuration| .3|The duration of the underlying BlindUp/BlindDown Scriptaculous effects.|

h4. Options: classNames

|_.Name|_.Default Value_.Description|
|section|'section'|A CSS class on the element that contains the title and the toggle element.|
|title|'title'|A CSS class on the element that is clicked to show or hide sections.|
|toggle|'toggle'|A CSS class on the element that is to be shown or hidden when the title element is clicked.|
|expanded|'expanded'|A CSS class that is on the section element when the section is expanded.|


h2. Custom Events

The main Accordion class fires custom events that you can hook into.

|_.Accordion Custom Event Name|_.Description|_.Event Memo|
|id + ':initialized'|Fired when the class initializes.|Contains a reference to the accordion instance.|
|id + ':clicked'|Fired when a section title is clicked.|Contains a reference to the accordion instance.|

The AccordionSection class also fires custom events that you can hook into.

|_.AccordionSection Custom Event Name|_.Description|_.Event Memo|
|id + ':hidden'|Fired when a section is hidden.|Contains a reference to the accordion instance and the related section. Occurs at the end of the effect duration.|
|id + ':shown'|Fired when a section is shown.|Contains a reference to the accordion instance and the related section. Occurs at the end of the effect duration.|



{'fraction_non_alphanumeric': 0.09186906019007392, 'fraction_numerical': 0.0027455121436114043, 'mean_word_length': 4.912609238451935, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1402078', 'n_tokens_mistral': 1362, 'n_tokens_neox': 1305, 'n_words': 587}