1
我有以下几点:查找特定类的下一个元素父里面jQuery的
<div class="container">
Test 1
<div class="child">Testing</div>
</div>
<div class="container">
Test 2
<div class="child">Testing</div>
</div>
<div class="container">
Test 3
<div class="child">Testing</div>
</div>
我希望有孩子的div容器内部多数民众赞成在上空盘旋,以显示和隐藏,当鼠标离开容器。
我目前做的有:
$('.container').hover(
function() {
$(this).next('.child').show();
},
function() {
$(this).next('.child').hide();
}
);
但似乎工作不。 任何建议表示感谢,谢谢。