代碼問題,為什么我的不顯示二級菜單
<!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>
<style type="text/css">
*{
margin:0;
padding:0;
}
.container{
margin:0 auto;
width:400px;
}
li{
list-style:none;
float:left;
width:90px;
line-height:34px;
text-align:center;
background:#CCC;
margin-right:1px;
}
a{
text-decoration:none;
color:#000;
font-weight:bold;
display:block;
}
.nav li ul{
position:absolute;
}
?.nav_pic{
display:block;
height:11px;
background:url(bird.png) 31px no-repeat;
?}
?.nav li ul{
display:none;
?}
?.nav li a:hover{
background:url(slide-pannel_14.png) repeat-x;
color:#fff;
?}
?.nav_first{
background:url(slide-pannel_14.png) repeat-x;
?}
</style>
? ?<script src="jquery-1.7.1.min.js" type="text/javascript"></script>
? ?<script type="text/javascript">
? ? ?$(document).ready(function() {
? ? ? ? $(".nav li").mousemove(function(){
? ?$("this").find("ul").slideDown("1000");
})
$(".nav li").mouseleave(function(){
$("this").find("ul").slideUp("slow");
})
? ? });
? ?</script>
</head>
<body>
? ?<div class="container">
? ? ?<ul class="nav">
? ? ? ?<li class="nav_first"><a href="#">首頁</a></li>
? ? ? ?<li><a href="#">課程大廳</a>
? ? ? ? ? <ul>
? ? ? ? ? ? ?<span class="nav_pic"></span>
? ? ? ? ? ? ?<li><a href="#">javascript</a></li>
? ? ? ? ? ? ?<li><a href="#">jQuery</a></li>
? ? ? ? ? ? ?<li><a href="#">css</a></li>
? ? ? ? ? </ul>
? ? ? ?</li>
? ? ? ?<li><a href="#">學習我們</a></li>
? ? ? ?<li><a href="#">聯(lián)系我們</a></li>
? ? ?</ul>
? ?</div>
</body>
</html>
2016-09-13
?$("this").find("ul").slideDown("1000");? 里面的this不要用引號? $(this).find("ul").slideDown("1000");?