KO
kolappannathan/accordion
Simple Accordion done in Vanilla JS
Accordion
Simple Accordion done in Vanilla JavaScript. It is based on pinceladasdaweb's work. It is lightweight, easy to install and use.
Usage
- Paste right before your page's closing
</body>tag:
<script type="text/javascript" src="accordion.min.js"></script>- Include the css in your html page
<link rel="stylesheet" type="text/css" href="accordion.min.css">- Minimum HTML to make it work:
<div class="acc-section">
<h2 class="acc-title">Title here</h2>
<div><!-- HTML here --></div>
<h5 class="acc-title">Title here</h5>
<div><!-- HTML here --></div>
<div class="acc-title">Title here</div>
<div><!-- HTML here --></div>
</div>On this page
Languages
JavaScript92.8%CSS7.2%
MIT License
Created April 23, 2018
Updated January 28, 2023