我想为购物车创建快速视图,
问题1:当我将鼠标放在任何一个框上时,所有框上都会出现quickview,我怎样才能只在父节点中显示它。
问题 2:当我将鼠标放在快速查看链接上时,它一直在切换 .
这是我的代码
<html>
<title>Quick view </title>
<head>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<style type="text/css">
.quickview{
margin:0px;
position:absolute;
margin-top:18%;
margin-left:12%;
border:1px;
border-color:red;
border-style:dotted;
display:none;
}
.box{
margin:10px;
height:300px;
width:400px;
border:2px;
border-color:green;
border-style:solid;
background-color:silver;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$(".box").bind('mouseover',function(event){
$(".quickview").stop(true,true).fadeIn(100);
});
$(".box").bind('mouseleave', function(e) {
$(".quickview").stop(true,true).fadeOut(100);
});
});
</script>
</script>
</head>
<body>
<div style="margin:10px;">
<table>
<tr>
<TD>
<div class="quickview">
<a href="doo.php">Quick View</a>
</div>
<div class="box">
<a href="foo.php">
</a>
</div>
</TD>
<TD>
<div class="quickview">
<a href="doo.php">Quick View</a>
</div>
<div class="box">
<a href="foo.php">
</a>
</div>
</TD>
</tr>
<tr>
<TD>
<div class="quickview">
<a href="doo.php">Quick View</a>
</div>
<div class="box">
<a href="foo.php">
</a>
</div>
</TD>
<TD>
<div class="quickview">
<a href="doo.php">Quick View</a>
</div>
<div class="box">
<a href="foo.php">
</a>
</div>
</TD>
</tr>
</table>
</div>
</body>
</html>
提前感谢