JSFiddle - React, Tailwind, and code Playground

HTML

<h3 id="btn-1">Content Title</h3>
<ul><li>Some Content</li></ul>
...stuff here and further down the page... 
<h3 id="btn-2">Content Title 2</h3>
<ul><li>Some content 22</li></ul>

CSS

.inactive {
    background : grey;
}
ul {
    display : none;
}

JavaScript

$("*[id^='btn-']").attr('class','inactive').click(function (index){
        $(this).toggleClass('inactive active').next().toggle("slow")