R
richard
In using the simple code below, how do I tell it NOT to hide a
division when the link is clicked on if that division is already
visible?
would it be as simple as using a 2nd function and setting that to
"display" rather than "none"?
For instance, "home" is showing. The user clicks on "home".
I don't want the division to do anything at all.
function ShowHide(){
if (document.getElementById('hide2').style.display ==
document.getElementById('home1').style.display){
document.getElementById('hide2').style.display = "none";
} else {
document.getElementById('hide2').style.display =
document.getElementById('home1').style.display
}
}
division when the link is clicked on if that division is already
visible?
would it be as simple as using a 2nd function and setting that to
"display" rather than "none"?
For instance, "home" is showing. The user clicks on "home".
I don't want the division to do anything at all.
function ShowHide(){
if (document.getElementById('hide2').style.display ==
document.getElementById('home1').style.display){
document.getElementById('hide2').style.display = "none";
} else {
document.getElementById('hide2').style.display =
document.getElementById('home1').style.display
}
}