我正在尝试将鼠标悬停在底部栏上,它将在其上方的另一个 div 中滑动,我可以单击位于其中的项目,然后当我将鼠标移开时,两个“出现的 div”都会滑开。
但是,当我将鼠标从底部栏中移动以单击新出现的 div 中的某些内容(在 div 中滑动)时,它重新启用了效果,我该如何停止它以便我可以将鼠标悬停在两者上(在 div 中的滑动之后启用)并让它重新启动效果,基本上将其放入相同的幻灯片向下/幻灯片效果的循环中。
这是我的代码:
$(".playlist").hide();
$(".player, .playlist").hover(
function(){ $(".playlist").slideDown(); },
function(){ $(".playlist").slideUp(); }
);
还有我的 HTML:
<div class="playlist">
<!-- This would display some content that I can click on -->
</div>
<div class="player">
<!-- This expands across the whole window and is fixed to the bottom -->
</div>