这适用于Firefox,但不适用于Chrome或Safari。我有jQuery .hover并且工作正常,但是当我在该div内的图像中添加了内嵌onmouseover/onmouseout时,.hover(.main-description)不会显示。当我悬停但是文本块(.main-description)不会显示时,它实际上会将状态更改为“阻止”。onmouseover/onmouseout与chQuery上的JQuery .hover冲突?
HTML:
<img src="no-hover.png"
width="250" height="250" title="me"
onmouseover="this.src='hover.png';"
onmouseout="this.src=no-hover.png';">
JS:
$(".feature-main").hover(
function() {
$(this).children(".main-description").show();
},
function() {
$(this).children(".main-description").hide();
}
任何帮助,将不胜感激。我是否应该采用不同的解决方案?将onmouseover/onmouseout移动到JS呢?
You can check out the site at here
谢谢!