之間移動太快鼠標時,我有以下的HTML重複頁面上多次:jQuery的懸停問題內容
<div class="outer">
outer
<div class="inner">
inner
</div>
</div>
,並有這樣的jQuery:
$('.inner').hide();
$('.outer').hover(function(e) {
$(this).children('.inner').show("slide", {
direction: "right"
}, 1000);
}, function(e) {
$(this).children('.inner').hide("slide", {
direction: "right"
}, 1000);
});
正如你可以在這裏看到: http://jsfiddle.net/342q3/15/在div之間緩慢移動鼠標(等待動畫完成)可以實現一次只顯示一個內部div的所需效果。
但是,如果您快速移動鼠標之間的divs,所有的內部divs保持可見。
我試過使用stop()函數,但沒有成功。 如何防止內部div保持打開狀態?
我想你會很快(將更多內容添加到'內部'中)必須將腳本完全更改爲更「用戶友好」的內容。 –