直接上代码:
复制代码 代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery实现的树形列表菜单(Menu Tree) </title>
<meta name="Copyright" content=" https://www.jb51.net/" />
<meta name="description" content="jQuery实现的树形列表菜单(Menu Tree),JavaScript分享网" />
<meta content="JavaScript,分享,JavaScript代码,Ajax" name="keywords" />
<style type="text/css">
.padding {height:300px;}
This copyright notice must be kept untouched in the stylesheet at
all times.
The original version of this stylesheet and the associated (x)html
is available at https://www.jb51.net
Copyright (c) 2005-2008 Stu Nicholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any
way to fit your requirements.
#wrap {position:relative; height:200px; width:130px; z-index:100;}
#nav {position:absolute; left:0; top:0;}
#nav,
#nav ul {padding:0; margin:0; list-style:none; font-family:arial, sans-serif; background:#fff; font-weight:bold;}
#nav li a {padding-left:20px; white-space:nowrap;}
#nav li ul li a {padding-left:0;}
#nav ul {padding-left:20px;}
#nav li a {color:#66b; text-decoration:none; font-size:11px;}
#nav li {font-size:13px; line-height:25px; color:#d80; cursor:pointer; width:100%;}
#nav li.down {text-indent:20px;}
#nav li a:hover {text-decoration:underline;}
</style>
<script type="text/javascript" src="/UploadFiles/2021-04-02/jquery-1.3.2.min.js">
<script type="text/javascript">
This copyright notice must be untouched at all times.
Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved.
$(document).ready(function() {
$("ul#nav ul").hide();
$('ul#nav li:has(ul)').each(function(i) {
$(this).children().slideUp(400);
});
$('li.p1:has(ul)').click(function(event){
if (this == event.target) {
current = this;
$('ul#nav li:has(ul)').each(function(i) {
if (this != current) {$(this).children().slideUp(400);}
});
$(this).children("ul:eq(0)").slideToggle(400);
}
});
});
</script>
</head>
<body>
<div id="wrap">
<ul id="nav">
<li><a href="#url">Home</a></li>
<li class="p1 down">Products
<ul>
<li><a href="#url">Flashguns</a></li>
<li><a href="#url">Tripods</a></li>
<li><a href="#url">Filters</a></li>
</ul>
</li>
<li class="p1 down">Services
<ul>
<li><a href="#url">Printing</a></li>
<li><a href="#url">Photo Framing</a></li>
<li><a href="#url">Retouching</a></li>
<li><a href="#url">Archiving</a></li>
</ul>
</li>
</ul>
</div>
</body>
</html>
其中的jquery的地址自己得换一个能够找到的,要不没有效果
jquery,树形菜单,二级菜单
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
更新日志
- ABC唱片-鲍比达·新民乐《满江红》[APE+CUE]
- 许嵩.2014-不如吃茶去【海蝶】【WAV+CUE】
- 周笔畅.2024-HAVE.A.GOOD.NIGHT【SN.Music】【FLAC分轨】
- 周笔畅.2024-HAVE.A.NICE.DAY【SN.Music】【FLAC分轨】
- 证声音乐图书馆《真夏派对 x 迪斯可》[FLAC/分轨][380.78MB]
- 证声音乐图书馆《星空下 爵士钢琴》[320K/MP3][65.88MB]
- 证声音乐图书馆《星空下 爵士钢琴》[FLAC/分轨][283.95MB]
- 沙门怀一《竹山听雨HQ》头版限量[低速原抓WAV+CUE]
- 沙门怀一《于喁·壹HQ》头版限量编号[低速原抓WAV+CUE]
- 群星《魅音绝唱》黑胶CD【WAV】
- 腾格尔.2002-四十独白【风潮】【WAV+CUE】
- 陈明真.1992-到哪里找那么好的人【华星】【WAV+CUE】
- 黄凯芹.2012-廿五年3CD【环球】【WAV+CUE】
- 证声音乐图书馆《七夕 爵士情缘》[320K/MP3][64.8MB]
- 证声音乐图书馆《七夕 爵士情缘》[FLAC/分轨][327.79MB]