Forum Moderators: open
Ok going of webmonkey site I am trying to make a detractable verticle menu. I want to make it more colorful and box it up a little. Here is the code I have so far. If someone could help me edit it so it looks better and it a little more colorful that would be cool:
<script>
function WM_toggle(id){
if (document.all){
if(document.all[id].style.display == 'none'){
document.all[id].style.display = '';
} else {
document.all[id].style.display = 'none';
}
return false;
} else if (document.getElementById){
if(document.getElementById(id).style.display == 'none'){
document.getElementById(id).style.display = 'block';
} else {
document.getElementById(id).style.display = 'none';
}
return false;
}
}
</script>
<p class="header"><a href="#" onclick="WM_toggle('authoring'); return false">Authoring</a></p>
<p id="authoring" class="menu" style="display: none">HTML Basics <br>
Tables <br>
Frames <br>
Browsers <br>
Tools <br>
Stylesheets <br>
DHTML <br>
XML
</p>
<p class="header"><a href="#" onclick="WM_toggle('design'); return false">Design</a></p>
<p id="design" class="menu" style="display: none">Site Building <br>
Graphics <br>
Fonts </p>
<p class="header"><a href="#" onclick="WM_toggle('multimedia'); return false">Multimedia</a></p>
<p id="multimedia" class="menu" style="display: none">Audio/MP3<br>
Shockwave/Flash<br>
Video <br>
Animation </p>
<p class="header"><a href="#" onclick="WM_toggle('ebusiness'); return false">E-Business</a></p>
<p id="ebusiness" class="menu" style="display: none">Building <br>
Marketing <br>
Tracking </p>
<p class="header"><a href="#" onclick="WM_toggle('programming'); return false">Programming</a></p>
<p id="programming" class="menu" style="display: none">JavaScript <br>
Java<br>
ASP<br>
PHP <br>
ColdFusion <br>
Perl/CGI </p>
<p class="header"><a href="#" onclick="WM_toggle('backend'); return false">Backend</a></p>
<p id="backend" class="menu" style="display: none">Databases<br>
Apache/XSSI <br>
Unix <br>
Security <br>
Networks<br>
Protocols </p>
<p class="header"><a href="#" onclick="WM_toggle('jobs'); return false">Jobs</a></p>
<p id="jobs" class="menu" style="display: none">Tips</p>
<p class="header"><a href="#" onclick="WM_toggle('about'); return false">About Webmonkey</a></p>
<p id="about" class="menu" style="display: none">Staff Hideout <br>
Link to Us <br>
Webmonkey Latin America<br>
Webmonkey Japan
</p>
What am I missing here. This is all in the body section.
Here's an excellent thread about how to code a solid dhtml menu:
[webmasterworld.com...]