マウスを div の上にslide
置くと、slide_panel
div が表示されます。
ただし、マウスがslide
div を出て のコンテンツ上にあるslide_panel
場合、パネルは表示されたままになりません。
では、パネルが最初に表示されたら、トグルされたパネルをどのように表示したままにしmouseover
ますか?
HTML:
<div class = "slide">category:</div>
<div class = "slide_panel">
<a href = "#" title = "">asdf</a><br />
<a href = "#" title = "">qwerty</a><br />
</div>
<div class = "slide">another category:</div>
<div class = "slide_panel">
<a href = "#" title = "">another asdf</a><br />
<a href = "#" title = "">another qwerty</a><br />
</div>
jQuery:
$(".slide").mouseover(function() {
$(this).next(".slide_panel").slideToggle();
}).mouseout(function() {
$(this).next(".slide_panel").slideToggle();
});
編集: 基本的にドロップダウンメニューのように動作するように、 で消え
ます。
slide_panel
mouseout