|
I have seen it used in theory but I can't get it to work.
Take this code for example
<div class="menuitem">
<a href="#" onClick="menu()">SHOWIT</a>
<div id="me">HELLO</div>
<div name="subitem" class="subitem">HELLO AGAIN</div>
</div>
Now if the menu function is
function menu()
{
document.getElementById(me).style.visibility = "visible";
}
Then clicking the link shows the hidden div "me".
If it is
function menu()
{
document.getElementByClass('subitem').style.visibility = "visible";
document.getElementById('me').style.visibility = "visible";
}
Or
function menu()
{
document.getElementByClass('subitem').style.visibility = "visible";
}
Nothing is shown. What am I doing wrong? Anybody know?
Thanks
Ironfistchamp
|
|
|
|
|
|
|
|