How to use it?
Below you can find a simplified version of the required HTML.
<ul class="accordion">
<li>
<h2>Lorem Ipsum</h2>
<p>...</p>
</li>
<li>
<h2>Dolor Sit Amet</h2>
<p>...</p>
</li>
</ul>
<link rel="stylesheet" href="accordion.css" />
<script src="accordion.js"></script>
Want something more radical/native? Try this approach. It relies on the details element, which is really nice. However, it is quite hard to animate and has some cross-browser issues.