I found a javascript snippit to use and based on that have figured out how to show a hidden layer off a link, and how to close it off another. My problem is I don’t know how to alter it in order for the layer to be showen and close off of the SAME link similar to this: [URL=http://www.microsoft.com/office/project/prodinfo/faq.mspx#EEAAA]Same Link Show/Hide
So my current script is:
<script type=”text/javascript”>
<!–
function toggleAnswer(szDivID, iState) // 1 visible, 0 hidden
{
if(document.layers) //NN4+
{
document.layers[szDivID].visibility = iState ? “show” : “hide”;
}
else if(document.getElementById) //gecko(NN6) + IE 5+
{
var obj = document.getElementById(szDivID);
obj.style.visibility = iState ? “visible” : “hidden”;
}
else if(document.all) // IE 4
{
document.all[szDivID].style.visibility = iState ? “visible” : “hidden”;
}
}
// –>
And my code is:
<div class=”faq”>
<a href=”javascript:;”onMouseDown=”toggleAnswer(‘A1’,1)”>Question?</a></div>
<div id=”A1″ class=”faqbody”>Answer.</div>
The class “faqbody” has the attribute: “visibility:hidden;”