Forum Moderators: open
right now they all can be opened at the same time, and it makes my links drop past my column....
<script language="javascript">
function toggleDiv(divid){
if(document.getElementById(divid).style.display == 'none'){
document.getElementById(divid).style.display = 'block';
}else{
document.getElementById(divid).style.display = 'none';
}
}
</script>
<li><a onclick="toggleDiv('kootenai');" href="javascript:;">Kootenai</a></li>
<div id="kootenai" style="display: none;">
Show hidden text here...!
</div>
<script type="text/javascript">
var divIds=['kootenai', //a list of all the id's you want to toggle
'bar',
'foo'];function toggleDiv(divid){
var i, div;
for(i=0; (div=document.getElementById(divIds[i])) ;i++){
if(divIds[i]!=divid){
div.style.display = 'none';
}else{
div.style.display = '';
}
}
}
</script>
untested. should work tho. Works the same as the old one