<div class="four_block inline_block" > <img src="/ehouse/img/item/industry/part1.jpg" class="first_show"> <img src="/ehouse/img/item/industry/part11.jpg" class="second_show"> </div>$(function(){ $(".second_show").hide(); $(".first_show").hover( function(){ $(this).hide(); $(this).siblings(".second_show").show(); }, function(){ $(this).siblings(".second_show").hide(); $(this).show(); })})
3 回答
慕村9548890
TA贡献1884条经验 获得超4个赞
因为在'$(".first_show").hover'这个事件中,鼠标移上去,你通过 $(this).hide()让'$(".first_show")'隐藏了,同时触发移出事件,所以会存在来回闪烁
添加回答
举报
0/150
提交
取消
