New on DHTMLGoodies.com:
DHTML Chess is now available for WordPress at WordPressChess.com.
Demo
You define your questions and answers like this: <div id="q1" class="question">- How does this work ?</div> <div id="a1" class="answer">This is done by use of <divs> and altering the css attribute "display"</div>
I.e. two simple divs, where the first one got the id "q1" and the second one the id "a1". "1" indicates that this is the first question. Q&A number 2 should have the id "q2" and "a2". The first div should be assigned to the class "question" and the second one the "answer" class.
The script is initialized by the initShowHideContent() function. This function is executed as an window onload event. If you allready have a onload event, you could replace the line window.onload = initShowHideContent; with either <BODY onload="initShowHideContent()"> or a direct call to the function below your last q&a divs. example: <SCRIPT type="text/javascript"> initShowHideContent() </SCRIPT>
No one has commented this - be first!
Don't have an avatar? Create one at Gravatar.com.