How to display/hide text on a web page using openClose in HTML
Posted on 2011-09-14
I am trying to create a FAQ page where the answers to the FAQ will appear if you click on the question. The FAQ are in a numbered list. I figured out that openClose must be used, so I have something like this:
<div onClick="openClose('Answer1')" ><<li><span class="style_bold" >Question 1 here.</span></li>
<div id="Answer1" class="style_bold" ><p>Answer 1. </p></div>
Clicking on a question should make the answer to the question visible. Clicking on another question should close the first answer and open the appropriate answer.