HTML
<div class="wrapper">
<div class="menu" id="atl-block">Menu-1</div>
<div class="menu" id="btl-block">Menu-2</div>
<div class="menu" id="ctl-block">Menu-3</div>
<div class="menu" id="dtl-block">Menu-4</div>
<a href="javascript:void(0);" class="btn01">Click1</a>
<a href="javascript:void(0);" class="btn02">Click2</a>
<a href="javascript:void(0);" class="btn03">Click3</a>
<a href="javascript:void(0);" class="btn04">Click4</a>
</div>
CSS
.wrapper {
position:relative;
}
.menu {
width:500px;
height:300px;
background-color:#f00;
position:absolute;
top:50px;
display:none;
}
JQUERY
$('.wrapper').children('a').on('click',function(){
$('.wrapper').children('div').hide().eq($(this).index()-4).fadeIn(400);
});
在包装器div中单击任何标签时,显示相关的div。但是当div上的mouseout时我无法隐藏div。我该怎么办?