学习JQUERY,写的简单下拉菜单!
HTML代码:
- <!DOCTYPE html>
- <html>
- <head>
- <script type="text/javascript" src="http://ajax.zuola.net/ajax/libs
- /jquery/1.7.2/jquery.min.js"></script>
- <title>side menu</title>
- </head>
- <body>
- <div id="menu">
- <div class="m-one">
- <span class="m-tit">主菜单01</span>
- <ul class="m-ul">
- <li class="m-li">子菜单11</li>
- <li class="m-li">子菜单12</li>
- <li class="m-li">子菜单13</li>
- </ul>
- </div>
- <div class="m-one">
- <span class="m-tit">主菜单02</span>
- <ul class="m-ul">
- <li class="m-li">子菜单21</li>
- <li class="m-li">子菜单22</li>
- <li class="m-li">子菜单23</li>
- </ul>
- </div>
- <div class="m-one">
- <span class="m-tit">主菜单03</span>
- <ul class="m-ul">
- <li class="m-li">子菜单31</li>
- <li class="m-li">子菜单32</li>
- <li class="m-li">子菜单33</li>
- </ul>
- </div>
- <div class="m-one">
- <span class="m-tit">主菜单04</span>
- <ul class="m-ul">
- <li class="m-li">子菜单41</li>
- <li class="m-li">子菜单42</li>
- <li class="m-li">子菜单43</li>
- </ul>
- </div>
- <div class="m-one">