I was just wondering anyone could assist me with a bit of javascript. I have a simple show/hide toggle script:
Code:
<script language="javascript">
<!--
var state = 'none';
function showhide(layer_ref) {
if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) {
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) {
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
hza = document.getElementById(layer_ref);
hza.style.display = state;
}
}
//-->
</script>
Works awesome, however I want to modify it so that if "Div1" is shown, "Div2" cannot be expanded. Is there a way I can do this?
Thanks
Jeff