The code below expands and shrinks when you click the hyperlinks,
and if you expand one the other div shirinks.
But now I want to show the div for MENU1 when you open the page and if you click on MENU2, MENU3, ext. that div expands and the MENU1 shrinks
<style type="text/css">
.menu1{
display:block;
}
.submenu{
display: block;
}
.hide{
display: none;
}
.show{
display: block;
}
</style>
<script>
var last_expanded = '';
function showHide(id)
{
var obj = document.getElementById(id);
var status = obj.className;
if (status == 'hide') {
if (last_expanded != '') {
var last_obj = document.getElementById(last_expanded);
last_obj.className = 'hide';
}
obj.className = 'show';
last_expanded = id;
} else {
obj.className = 'hide';
}
}
and if you expand one the other div shirinks.
But now I want to show the div for MENU1 when you open the page and if you click on MENU2, MENU3, ext. that div expands and the MENU1 shrinks
<style type="text/css">
.menu1{
display:block;
}
.submenu{
display: block;
}
.hide{
display: none;
}
.show{
display: block;
}
</style>
<script>
var last_expanded = '';
function showHide(id)
{
var obj = document.getElementById(id);
var status = obj.className;
if (status == 'hide') {
if (last_expanded != '') {
var last_obj = document.getElementById(last_expanded);
last_obj.className = 'hide';
}
obj.className = 'show';
last_expanded = id;
} else {
obj.className = 'hide';
}
}