sonicsnail
Technical User
The javascript below hides content below headings... when the heading his clicked the content below it becomes visable. I wish to be able to click ONE button/link and have ALL of the content <span>'s appear...
how should I modify this script to do so?
thanks in advance...
Pete
-----------------
<html>
<head>
<script language="JavaScript1.2">
<!--
var head="display:''"
function doit(header){
var head=header.style
if (head.display=="none"
head.display=""
else
head.display="none"
}
//-->
</script>
</head>
<body>
<H3 style="cursor:hand" onclick="doit(document.all[this.sourceIndex+1])">YOUR HEADING HERE</H3>
<SPAN style="display: none">CONTENT HERE</SPAN>
<H3 style="cursor:hand" onclick="doit(document.all[this.sourceIndex+1])">2342345</H3>
<SPAN style="display: none">2341234 CONTENT HERE</SPAN>
<H3 style="cursor:hand" onclick="doit(document.all[this.sourceIndex+1])">asdfasdfasdf</H3>
<SPAN style="display: none">asdfasdfa CONTENT HERE</SPAN>
how should I modify this script to do so?
thanks in advance...
Pete
-----------------
<html>
<head>
<script language="JavaScript1.2">
<!--
var head="display:''"
function doit(header){
var head=header.style
if (head.display=="none"
head.display=""
else
head.display="none"
}
//-->
</script>
</head>
<body>
<H3 style="cursor:hand" onclick="doit(document.all[this.sourceIndex+1])">YOUR HEADING HERE</H3>
<SPAN style="display: none">CONTENT HERE</SPAN>
<H3 style="cursor:hand" onclick="doit(document.all[this.sourceIndex+1])">2342345</H3>
<SPAN style="display: none">2341234 CONTENT HERE</SPAN>
<H3 style="cursor:hand" onclick="doit(document.all[this.sourceIndex+1])">asdfasdfasdf</H3>
<SPAN style="display: none">asdfasdfa CONTENT HERE</SPAN>