FAQ/"Toggle" HTML

mconway4
Community Novice

I found the HTML (below) for an FAQ set up (students can click the question and the answer pops up below it), which I like. However, when you click one question, all of the questions/answers expand. Is there a way to adjust this so only the one answer shows up, rather than all of them? Thank you!

<h4><span class="element_toggler btn btn-primary" aria-controls="instructions" aria-label="Toggler toggle list visibility" aria-expanded="false"> What are Dr. C's contact information and office hours?</span></h4>
<ul id="instructions" style="list-style: none; display: none;">
<li>
<p>ANSWER</p>
<p>ANSWER</p>
<p>ANSWER</p>
</li>
</ul>
<h4><span class="element_toggler btn btn-primary" aria-controls="instructions" aria-label="Toggler toggle list visibility" aria-expanded="false"> What classroom are we in and what days/times do we meet?</span></h4>
<ul id="instructions" style="list-style: none; display: none;">
<li>
<p>ANSWER</p>
<p>ANSWER</p>
</li>
</ul>

0 Likes