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.getEl ementById('hide 2').style.displ ay ==
document.getEle mentById('home1 ').style.displa y){
document.getEle mentById('hide2 ').style.displa y = "none";
} else {
document.getEle mentById('hide2 ').style.displa y =
document.getEle mentById('home1 ').style.displa y
}
}
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.getEl ementById('hide 2').style.displ ay ==
document.getEle mentById('home1 ').style.displa y){
document.getEle mentById('hide2 ').style.displa y = "none";
} else {
document.getEle mentById('hide2 ').style.displa y =
document.getEle mentById('home1 ').style.displa y
}
}
Comment