-1
下面的代碼隱藏.titlerow
懸停.row
。如何更改代碼,以便鼠標不在任何行上徘徊,然後隱藏第一個.titlerow
?幫助懸停jquery
echo "<div class='row'><div class='titlerow'></div></div>
<div class='row'><div class='titlerow'></div></div>
<div class='row'><div class='titlerow'></div></div>
<div class='row'><div class='titlerow'></div></div>";
$(function() {
$('.row').hover(function() {
$(this).find('.titlerow').hide();
}, function() {
$(this).find('.titlerow').show();
});
});
感謝它的工作原理開始,但是當我將鼠標懸停在一排,然後把所有在一起的第一titlerow所示。 – user892134
那麼請詳細解釋一下你希望發生的事情,因爲我不太明白預期的行爲是什麼......如果你徘徊,你希望它隱藏你想讓它顯示的假,但是第一次一個需要隱藏? – Sander
我想要第一個.titlerow被隱藏起來,這是正確的。 .row的懸停,.titlerow隱藏,這是正確的。現在,如果所有的.row都沒有被徘徊,那麼第一個.titlerow應該被再次隱藏,但事實並非如此。 – user892134