q4.accordion
Creates an expanding and collapsing accordion from sections of content.- Script link
- q4.accordion.1.0.1.min.js
- Source file
- q4.accordion.js, line 2
- Requires
Options
- openMultipleSections boolean
-
Whether opening an accordion section will close the others.
- Default value
false
- openFirstItem boolean
-
Whether the first accordion item should be open at init.
- Default value
true
- trigger string
-
A selector for the trigger to open/close a section.
- Default value
.accordionTrigger
- indicator string
-
A selector for the expand/collapse message.
- Default value
.accordionTriggerText
- container string
-
A selector for the container to show/hide.
- Default value
.accordionContent
- expandText string
-
The indicator text for a closed section.
- Default value
EXPAND [ + ]
- collapseText string
-
The indicator text for an open section.
- Default value
CLOSE [ – ]
- activeClass string
-
A class to add to an open section.
- Default value
active
- sectionClass string
-
A class to add to each section.
- Default value
accordion-item
- template string
-
A Mustache template for each section.
- Example
'<div class="accordionItem">' + '<h3 class="accordionTrigger">' + '<span class="accordionTriggerText"></span>' + '{{{title}}}' + '</h3>' + '<div class="accordionContent">{{{content}}}</div>' + '</div>'
- content Array.<Object>
-
A list of objects representing sections.