Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Collapsible Navigation

Status
Not open for further replies.

wuzzle

Programmer
Joined
Dec 20, 2000
Messages
75
Location
CA
Could someone tell me why this isn't working? It's not collapsing...

<script language=&quot;javascript&quot;>

hidden=true;

function dropmen(){
if (hidden){
document.getElementById(&quot;thenavbar&quot;).className=&quot;on&quot;;
hidden=false;
}
else{
document.getElementById(&quot;thenavbar&quot;).className=&quot;off&quot;;
hidden=true;
}
}

</script>

and then...

<table width=&quot;50%&quot;>
<tr>
<td>
<div id=&quot;wholenavbar&quot; onClick=&quot;dropmen()&quot; class=&quot;navbar&quot;>
<div style=&quot;color: white; background-color: gray&quot;>Click to view Shady's Links</div>
<div id=&quot;thenavbar&quot; class=&quot;off&quot;>
<a href=&quot; <a href=&quot; <a href=&quot; </div>
</div>
</td>
</tr>
</table>
 
Check this site:

They have a colapsable menu like this on their left. Its sort of difficult to pull apart their method, but the code's there if you have the time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top