鼠标hover的jquery代码,鼠标不停经过时它就不停触发,怎么让它设个间隔或设一段时间只能触发一次
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!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鼠标悬停图片上滑动显示说明 </title>
<style>
@charset "utf-8";
*{ margin:0; padding:0;}
img{ border:none;}
.zzsc {
width:300px;
height:300px;
margin:auto;
position:relative;
}
.text {
width:300px;
height:auto;
background-color:#000;
FILTER:alpha(opacity=60);
opacity:0.7;
-moz-opacity:0.7;
position:absolute;
left:0px;
bottom:0px;
}
.imgtext {
width:280px;
height:auto;
float:left;
padding:10px;
color:#fff;
font-size:12px;
line-height:200%;
}
</style>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".imgtext").hide();
$(".zzsc").hover(function(){
$(".imgtext").slideToggle(400);
});
});
</script>
</head>
<body>
<div class="zzsc"><a href="#" ><img src="http://www.mm2you.com/pic/allimg/c1mmy/201307/008/slt.jpg"></a>
<div class="text">
<div class="imgtext"> 2012新品男T恤韩版短袖男士夏装男装翻领t恤POLO衫 货到付款 T93 </div>
</div>
</div>
</body>
</html> 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>jQuery鼠标悬停图片上滑动显示说明 </title>
<style>
@charset "utf-8";
*{ margin:0; padding:0;}
img{ border:none;}
.zzsc {
width:300px;
height:300px;
margin:auto;
position:relative;
}
.text {
width:300px;
height:auto;
background-color:#000;
FILTER:alpha(opacity=60);
opacity:0.7;
-moz-opacity:0.7;
position:absolute;
left:0px;
bottom:0px;
}
.imgtext {
width:280px;
height:auto;
float:left;
padding:10px;
color:#fff;
font-size:12px;
line-height:200%;
}
</style>
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".imgtext").hide();
$(".zzsc").hover(function(){
$(".imgtext").slideToggle(400);
});
});
</script>
</head>
<body>
<div class="zzsc"><a href="#" ><img src="http://www.mm2you.com/pic/allimg/c1mmy/201307/008/slt.jpg"></a>
<div class="text">
<div class="imgtext"> 2012新品男T恤韩版短袖男士夏装男装翻领t恤POLO衫 货到付款 T93 </div>
</div>
</div>
</body>
</html> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询