首页 > Jquery多个Div鼠标移入移出显示隐藏对应Div

Jquery多个Div鼠标移入移出显示隐藏对应Div

<div class="bigbox">
    <div class="list">
        <em>点击小图标<img src="小图标1.jpg" /></em>
        <span>我是显示的内容1</span>
    </div>
    <div class="other">这个DIV里还有其它DIV</div>
</div>

<div class="bigbox">
    <div class="list">
        <em>点击小图标<img src="小图标2.jpg" /></em>
        <span>我是显示的内容2</span>
    </div>
    <div class="other">这个DIV里还有其它DIV</div>
</div>

<div class="bigbox">
    <div class="list">
        <em>点击小图标<img src="小图标3.jpg" /></em>
        <span>我是显示的内容3</span>
    </div>
    <div class="other">这个DIV里还有其它DIV</div>
</div>

若干个这样类似的DIV, 代码循环出来的, 所以没办法用ID, 鼠标移动到 <em> 标签里的 <img> 标签时显示 <span> 标签里的内容,
移出隐藏, 在移入触发标签 <img> 时显示的 <span> 标签把鼠标移动到上面不会消失同样也是移出隐藏, 最好能让我加入
animate 代替掉 show(), hide(), 或toggle(), 这种效果请问该如何用JQUERY实现?先谢谢啦!~

就类似淘宝网主页里有一栏, 标题右边是二维码, 鼠标移动显示隐藏那样的.

如图所示


哥们这描述看的我快晕了(建议分条列出)

$(".bigbox img").hover(function(){
$(this).parent().next().show()
},function(){
return false
})

$(".bigbox span").hover(function(){
return false
},function(){
$(this).hide()
})

看Plunker


可以用children(),next()等抓取节点实现~


这个用CSS实现即可。

【热门文章】
【热门文章】