Bennelliott
04-28-2007, 05:12 PM
Hey, i got a pretty simple script which hides divs when you click a link, but I wanted to make the divs be hidden as default.
Here's the simple bit of code:
function hideshow(which){
if (!document.getElementById)
return
if (which.style.display=="block")
which.style.display="none"
else
which.style.display="block"
}
I've tried changing the 'else' line:
which.style.display="block" ==> to ==> which.style.display="none" but that has the undesirable effect of hiding it and not allowing it to be shown again.
Any ideas?
Tyvm in advance :p
Here's the simple bit of code:
function hideshow(which){
if (!document.getElementById)
return
if (which.style.display=="block")
which.style.display="none"
else
which.style.display="block"
}
I've tried changing the 'else' line:
which.style.display="block" ==> to ==> which.style.display="none" but that has the undesirable effect of hiding it and not allowing it to be shown again.
Any ideas?
Tyvm in advance :p