Try this if you wish to
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
<head>
<title>Click to see the answer</title>
<style>
.para {
font-family: "Verdana","Arial","sans-serif";
font-size: 10pt;
}
a.headings:link {
color: #000000;
text-decoration:underline;
width:100%;
}
a.headings:visited {
color: #aa6611;
width:100%
}
a.headings:hover {
color: #ff9933;
text-decoration:none;
width:100%
}
a.headings:active {
color: #0000ff;
width:100%
}
a.headings {
background-repeat: no-repeat;
font-family: "Verdana","arial","sans-serif";
font-size: 10px;
}
div.open {
width:600px;
border:2px solid red;
margin-top:40px;
margin-left:500px;
text-align:left;
padding-left:80px;
}
div.stuff {
width:500px;
margin-left:600px;
margin-top:40px;
}
</style>
<script type="text/javascript">
var subs_array = new Array("sub1","sub2","sub3");// Put the id's of your hidden divs in this array
function displaySubs(the_sub){
if (document.getElementById(the_sub).style.display==""){
document.getElementById(the_sub).style.display = "none";return
}
for (i=0;i<subs_array.length;i++){
var my_sub = document.getElementById(subs_array[i]);
my_sub.style.display = "none";
}
document.getElementById(the_sub).style.display = "";
}
</script>
</head>
<body>
<div class="open" >
<p><a href="javascript:void(0)" class="headings" onClick="displaySubs('sub1')" onFocus="if(this.blur)this.blur()";>
<strong>Click on this question and the hidden answer loads beneath the question</strong> </a> </p>
<div class="para" id="sub1" style="display:none">
number one---Epsum factorial non deposit quid pro quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum. Souvlaki ignitus carborundum e pluribus unum. Defacto lingo est igpay atinlay. Marquee selectus.
</div>
<p><a href="javascript:void(0)" class="headings" onClick="displaySubs('sub2')" onFocus="if(this.blur)this.blur()";>
<strong>Here is question number two</strong> </a> </p>
<div class="para" id="sub2" style="display:none">
number-two,,,,Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci.
</div>
<p><a href="javascript:void(0)" class="headings" onClick="displaySubs('sub3')" onFocus="if(this.blur)this.blur()";>
<strong>Click here for question number three</strong> </a> </p>
<div class="para" id="sub3" style="display:none">
three....Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam.
</div>
</div>
</body>
</html>
add more subs to the javascript to add to it (sub1,sub2,sub3 are already there so add from there sub4,sub5 etc....)
Bookmarks