Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have created menus.how to create submenus into menus..i used following code for creating menus.
C#
<ul id="sddm">    <li><a href="#"
        onmouseover="mopen('m4')" 
         önmouseout="mclosetime()">Posting Management>></a>
        <div id="m4" 
            onmouseover="mcancelclosetime()" 
             önmouseout="mclosetime()">
        <a href="#" >Institute>></a>
        <a href="#">Company</a>
        <a href="#">Consultant</a>
        <a href="#">Brand</a>
        </div>
        </li></ul>


now,i have to add submenu into institute.how to add plz help me.
Posted
Updated 30-May-12 18:15pm
v3

1 solution

XML
<ul id="sddm">
   <li><a href='#'><span>Posting Management</span></a></li>
   <li><a href='#'><span>Institute</span></a>
      <ul>
         <li><a href='#'><span>Item 1</span></a></li>
         <li><a href='#'><span>Item 2</span></a></li>
      </ul>
   </li>
</ul>


If you are using the JavaScript purely to show and hide sub menus then you can go a pure CSS route way. You can find out more by searching for Pure CSS menus. There are quite a few CSS Menu Makers [^] out there which you can check out also.

If you wish to go the JavaScript way, you will just need to update your code to show and hide the inner <ul>...</li>.

I hope this helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900