Return to Snippet

Revision: 20556
at November 18, 2009 15:41 by fackz


Initial Code
<script language="javascript" type="text/javascript">
function subMenu(show) {
if (show){
document.getElementById('sub_menu').style.display = 'block';
} else {
document.getElementById('sub_menu').style.display = 'none';
}
}
</script>

<div class="top_menu">
<a href="index.html">Home</a>&nbsp;&nbsp; |&nbsp;&nbsp; 
<a href="link.html" onmouseover="javascript:subMenu(true);" onmouseout="javascript:subMenu(false);">SubmenuLink</a>&nbsp;&nbsp; |&nbsp;&nbsp; 
<a href="link.html">other Link 1</a>&nbsp;&nbsp; |&nbsp;&nbsp; 
<a href="link.html">other link 2</a>&nbsp;&nbsp; |&nbsp;&nbsp; 
</div>
<div style="display:none" id="sub_menu" onmouseover="javascript:subMenu(true);" onmouseout="javascript:subMenu(false);">
<a href="link.html">sub 1</a>&nbsp;&nbsp; |&nbsp;&nbsp; 
<a href="link.html">sub2</a>&nbsp;&nbsp; |&nbsp;&nbsp; 
</div>

Initial URL

                                

Initial Description

                                

Initial Title
Easy Show and Hide submenus

Initial Tags

                                

Initial Language
JavaScript