I tried to create a drop-down menu in jQuery, but that turned out to be pretty complicated.
My code is here:
$(document).ready(function(){
$('ul li').mouseover(function()
{
$(this).children("ul").show();
});
$('ul li ul').mouseover(function()
{
$('ul li ul').show();
}).mouseout(function(){
$('ul li ul').hide();
});
});
Basically, I want to hover over the list item, and sub ul - at the drop-down list, then I can hover over the list items and, if the mouse is disconnected from the auxiliary navigation panel, the menu is hidden again.
thanks whale
UPDATE: I removed the border from CSS, and it works fine, so the tooltip appears when I hover over the 1px border, which is pretty weird.
source
share