Hi,
I'm using the following javascript function to expand and collapse portions
of text in a web page (targeted at IE5.5 and above):
function doExpand(paraNum,arrowNum) {
if (paraNum.style.display=="none") {
paraNum.style.display="";
arrowNum.src="collapse.gif";
}
else {
paraNum.style.display="none";
arrowNum.src="expand.gif";
}
}
Implemented as follows:
<p><a href="javascript:doExpand(exp1,ar1)"><img src="expand.gif" id="ar1"
border="0" width="9" height="9"></a>
Title Text</p>
<div id="exp1" style="display: none" onclick="doExpand(exp1,ar1)">
<p>Drop down text here</p>
</div>
And repeated when required in the same page after changing the paraNum and
arrowNum parameters.
Does anyone know how I could adapt the script to enable more than one set of
DIVs to be expanded at the same time... i.e.: with a link that says "Show
All" and when clicked, all collapsed text on the page is then exapnded...?
Thanks in advance for any clues...
James Hurrell
--
..