hi,
i am creating a simple dynamic menu for my study with the following structure:
<div id="mainMenu">
<div id="informatics" class="mainEntities"><t>Informatica</t>
<div id="informaticsSub" style="visibility:hidden">
<div class='subEntities'><t><a href='#'>Mens & Informatica</a></t></div>
<div class='subEntities'><t><a href='#'>Technische Informatica</a></t></div>
</div>
</div>
and with jquery i do this:
$(function () {
var currentMenu = null;
$(".mainEntities").mouseover(function () {
currentMenu = $(this).attr("id");
currentMenu = "#" + currentMenu;
$(currentMenu + "Sub").css("visibility", "visible");
});
$(currentMenu).mouseout(function () {
$(currentMenu + "Sub").css("visibility", "hidden");
});
});
now i need to find the correct selector for the mouseout event, because now the submenu disappears if i am getting of the current element (this) of the mainmenu, but i only want it to disappear if it is not anymore over the submenu, or if the mouse goes over another element of the main menu.
thanks vor your help.