首页 新闻 赞助 找找看

jquery 为什么会触发多次

0
悬赏园豆:10 [已关闭问题]

<html>
<head><title>TestDivShow</title>

<script src='js/jquery.js' type='text/javascript'></script>
<script src='js/jquery.simplemodal.js' type='text/javascript'></script>
</head>
<body>
<div id="div1" style="width:400px;height:200px;background-color:gray">
</div>
<div id="div2" style="width:400px;height:200px;background-color:green"></div>
<div id="div3" style="width:400px;height:200px;background-color:#069"><div

style="color:black;width:400px;height:20px" id="title">This is Title!

</div><div id="div31" style="width:400px;height:180px;background-

color:red;display:none"></div></div>
<script type="text/javascript">
$(document).ready(function(){
 $("#div1").eq(0).mouseover(function(){
    $("#div1").eq(0).fadeOut("slow",function(){});
    })
 $("#div2").eq(0).mouseover(function(){
    $("#div2").eq(0).fadeTo("slow",0.5,function(){});
    })
    $("#div3").eq(0).mouseover(function(){
    $("#div31").eq(0).fadeIn("slow",function(){alert("是不是下面这个层慢慢出现

了!")});
    })
$("#div3").eq(0).mouseout(function(){
    $("#div31").eq(0).fadeOut("slow",function(){});
    })
})
</script>
</body>
</html>

-----------------------------------

$("#div31").eq(0).fadeIn("slow",function(){alert("是不是下面这个层慢慢出现

了!")});为什么触发了两次

david.lee的主页 david.lee | 初学一级 | 园豆:160
提问于:2009-04-20 18:03
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册