Hey all,
So what I’m basically trying to do is create a site that has all it’s elements on one page and rather than using hyperlinks, I want to toggle the visibility of some <div>s on the page. I got a script to work to actually toggle the visibility property of the <div>s:
function toggleVisibility(objectID) {
var object = document.getElementById(objectID);
state = object.style.visibility;
if(state == ‘hidden’)
object.style.visibility = ‘visible’;
else{
if(state == ‘visible’)
object.style.visibility = ‘hidden’;
else object.style.visibility = ‘visible’;
}
}
My issue is that I’m trying to write a script to make sure that if one <div> is turned visibile, that the rest are invisible. I know that this is an easy fix and I’m just being dumb, but can someone give me suggestions? Right now I’m trying to work it through an array.
~tsg