<!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>无档</title>
<script src="jq.js" type="text/javascript"></script>
<script src="js.js" type="text/javascript"></script>
</head>
<style>
#menu{
width:300px; .haschildren{
padding:3px;
background-color:#999;
margin-bottom:11px; div a{
z-index:-11px;
background:#666;
display:none;
float:left;
width:300px;
}
</style>
<body>
<div id="menu">
<div class="haschildren">
<span>第一章</span>
<a>javascript</a>
<a>加入</a>
<a>编写方法</a>
<a>小结</a>
</div>
<div class="haschildren">
<span>第二章</span>
<a>jquery选择器是什么</a>
<a>jquery的优势</a>
<a>jquery选择器</a>
<a>小结</a>
</div> </div> </body>
</html>
$(document).ready(function(){
$(".haschildren").hover(function(){ $(this).children("a").stop(true,true).slideDown(511).end()
.siblings().children("a").stop(true,true).slideUp(111); },function(){
$(this).stop(true,true);
$(this).children("a").slideUp(1111);
});