Simple Accordion done in Vanilla JS
CSS HTML JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
assets Multiple Accordion Apr 23, 2018
README.md Multiple Accordion Apr 23, 2018
index.html Multiple Accordion Apr 23, 2018

README.md

Accordion

Simple Accordion done in Vanilla JS.

Usage

  1. Paste right before your page's closing </body> tag:
<script type="text/javascript" src="accordion.js"></script>
  1. Minimum HTML to make it work:
<div class="accordion">
    <h2>Title here</h2>
    <div><!-- HTML here --></div>
    <h2>Title here</h2>
    <div><!-- HTML here --></div>
    <h2>Title here</h2>
    <div><!-- HTML here --></div>
</div>