直接上碼: 複製代碼 代碼如下: -/html/PUBL "IC DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> jQuery實現的樹型列表選單(Menu Tree) <BR>.padding {height:300px;} <BR> This copyright notice must be kept untouched in the stylesheet at <BR>all times. <br><🎜this><🎜vers originals. stylesheet and the associated (x)html <br>is available at http://www.jb51.net<BR>Copyright (c) 2005-2008 Stu Nicholls. All rights reserved. <BR>This stylesheet and the associated (x )html may be modified in any <BR>way to fit your requirements. <BR><br> <br>#wrap {position:relative; height:200px; width:130px; z-index:100; #nav {position:absolute; left:0; top:0;} <BR>#nav, <BR>#nav ul {padding:0; margin:0; list-style:none; font-family:arial, sans -serif; background:#fff; font-weight:bold;} <BR>#nav li a {padding-left:20px; white-space:nowrap;} <BR>#nav li ul li a {padding-left: 0;} <BR><BR>#nav ul {padding-left:20px;} <br>#nav li a {color:#66b; text-decoration:none; font-size:11px;} <br># nav li {font-size:13px; line-height:25px; color:#d80; cursor:pointer; width:100%;} <BR>#nav li.down {text-indent:20px;} <BR><BR>#nav li a:hover {text-decoration:underline;} <br><br> <br> This copyright notice must be untouched at all times. <br>Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved. <BR><BR>$(document).ready(function() { <br><br>$("ul#nav ul").hide(); <br> $('ul#nav li:has(ul)').each(function(i) { <br>$(this).children().slideUp(400); <BR>}); <BR> <BR>$('li.p1:has(ul)').click(function(event){ if (this == event.target) { <P> , $ current = ul#nav li:has(ul)').each(function(i) { <BR> if (this != current) {$(this).children().slideUp(400) } <> ; <BR> $(this).children("ul:eq(0)").slideToggle(400); <BR> } <BR> > <BR> Home Products Flashguns Tripods a href="#url">Filters Services Printing Photo Framing Retouching Archiving 其中的jquery的地址自己得換一個能夠找到的,要不沒有效果