JS Slide menu, slide out of level two navigation

Source: Internet
Author: User

<! DOCTYPE html>
<title> Shijiazhuang Slag Slurry pump </title>
<style type= "Text/css" >
Ul#sidemenu, Ul#sidemenu ul{list-style-type:none;margin:0;padding:0;width:185px;}
Ul#sidemenu A{display:block;text-decoration:none;}
Ul#sidemenu li{margin:5px Auto;}
Ul#sidemenu Li A{background: #333; Font-size:12px;color: #fff; height:28px;line-height:28px;padding-left:5px;}
Ul#sidemenu Li A:hover{background: #000;}
Ul#sidemenu Li ul li a{background: #ccc; color: #000;p adding-left:20px;}
Ul#sidemenu Li ul li a:hover{background: #aaa; border-left:5px #000 solid;padding-left:15px;}
</style>
<body>
<div class= "Leftbar" >
<ul id= "Sidemenu" >
<li><a href= "http://www.codefans.net/sort/list_15_208_1.shtml" >+ Web Menu class material one </a>
<ul>
<li><a href= "#" > Slide menu </a></li>
<li><a href= "#" > Folding menu </a></li>
<li><a href= "#" > Vertical menu </a></li>
</ul>
</li>
<li><a href= "#" >+ Programming Source class Resources </a>
<ul>
<li><a href= "#" >asp source </a></li>
<li><a href= "#" >delphi source </a></li>
<li><a href= "#" >vc++ source </a></li>
<li><a href= "#" &GT;VB source </a></li>
</ul>
</li>
</ul>
</div>
<script type= "Text/javascript" src= "Http://www.codefans.net/ajaxjs/jquery-1.6.2.min.js" ></script>
<script type= "Text/javascript" >
function Initmenu () {
$ (' #sidemenu ul '). Hide ();
$ (' #sidemenu ul:first '). Hide ();
$ (' #sidemenu li a '). Click (
function () {
var checkelement = $ (this). Next ();
if ((checkelement.is (' ul ')) && (checkelement.is (': Visible ')) {
return false;
}
if ((checkelement.is (' ul ')) && (!checkelement.is (': Visible ')) {
$ (' #sidemenu ul:visible '). Slideup (' normal ');
Checkelement.slidedown (' normal ');
return false;
}
}
);
}
$ (document). Ready (function () {Initmenu ();});
</script>
</body>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.