我有一個懸停的問題。他們在IE中工作正常,但不是Mozilla Firefox或Chrome。我猜這是因爲它很模糊,每td但現在這就是我需要的。這裏的小提琴(不工作)http://jsfiddle.net/233qG/在此先感謝。jQuery懸停只適用於Internet Explorer
的HTML
<table>
<tr>
<td>one</td>
</tr>
<tr>
<td>two</td>
</tr>
<tr>
<td>three</td>
</tr>
</table>
<div class="modalPop">Modal Information</div>
的CSS
div.modalPop
{
display:none;
position:absolute;
border:solid 1px black;
padding:8px;
background-color:white;
margin: 280px 50px 0 0;
z-index: 9999;
}
a.modalPop:hover + div.modalPop
{
display:block;
}
div.modalPop:hover
{
display:block;
}
jQuery的
$(document).ready(function(){
$('td').hover(
function(){$('.modalPop' + this).stop().hide().fadeIn('slow');},
function(){$('.modalPop' + this).stop(true, true).fadeOut('slow');}
);
});
'$'???將一個元素添加到字符串中。我驚訝它可以在任何地方工作? – adeneo 2013-02-12 16:15:08
我沒有看到'a.modalPop'元素... – Christoph 2013-02-12 16:15:19
你甚至看過你的控制檯錯誤嗎? – Sparky 2013-02-12 16:15:47