I've made the peice of code below to toggle the selected elements 'display' from 'display' to 'none' and vice versa. Now i'd like to know if it's possible for me to toggle the display elements of 2 IDs.
e.g. Click on one Div, that closes and another one opens.
Cheers :)
[code=javascript]
function toggle(theDIV){
chStyle = document.getEle mentById(theDIV ).style ;
if(chStyle.disp lay == "block" || leStyle.display =="") {
chStyle.display = "none";
}
else{
chStyle.display = "block";
}
}
[/code]
e.g. Click on one Div, that closes and another one opens.
Cheers :)
[code=javascript]
function toggle(theDIV){
chStyle = document.getEle mentById(theDIV ).style ;
if(chStyle.disp lay == "block" || leStyle.display =="") {
chStyle.display = "none";
}
else{
chStyle.display = "block";
}
}
[/code]
Comment