我正在使用jquery代码来显示和隐藏文本div当mousOver在img上。 它工作正常,但是当显示div时,当mouseOver div时,它隐藏并在mouseOver时再次显示它。 我想要做的是显示div时mouseOver图像,当mouseOver内部图像和文本div div不隐藏时,我希望div只有当从img的mouseOut隐藏。 问题是我猜,因为我的div是与位置:绝对,但我必须保持这一点。text div显示和隐藏在mouseOver img
这里是我的jQuery:
$(".image_big").hover(function(){
$('.cartouche').show();
},function(){
$('.cartouche').hide();
});
和我的CSS:
.cartouche {display:none;position: absolute;
bottom: 0px;
background-color: #00B252;
color: white;
text-transform: uppercase;
text-align: left;padding: 10px}
.image_big_container{width:473px;height:330px;text-align: center;}
#slideshow{margin-top: 20px;position:relative}
#slideshow_big { margin-bottom:10px}
这里的jsfiddle看到它在行动:
http://jsfiddle.net/m7zFb/352/
我也将有很多图片在我的网站上,并且只想从图像中删除文本div被选中,有没有一种方法可以添加一个this.children只将目标放在图像上我是mouseOver?
希望你明白我的问题,
感谢您的帮助