Simple but powerful jquery accordion script
Include core css file
<link rel="stylesheet" href="dm-accordion-core.css" />
Include accordion script and jQuery (if not included already)
<script src="jquery.min.js"></script>
<script src="jquery.dm-accordion.js"></script>
Call accordion function for your markup:
dmAccordion({
headings: '.some-heading', // Accordion heading elements
contents: '.some-content' // Accordion content elements
});
Use rewrite default parame`ters to customize an accordion: dmAccordion({ headings: '.dm-accordion-heading', // Accordion heading elements contents: '.dm-accordion-content', // Accordion content elements openSingle: false, // Only one section can be opened at a time openFirst: false, // First section is opened initially speed: '300', // Opening/closing speed });