I have a div and onmouseover of that div i need to show the menu and when use onmouseouts from that div i need to hide that menu i tried doing this with contextmenu and successfully show/hide menu but the problem is when user onmouseouts to click the menu the menu gets hidden. I need to keep showing menu onmouseout but if user goes away i need to hide.
Here is a sample code of what i am trying to achieve.
<div class="items1 anchorclass" rel="submenu1" onmouseover="showMenu(event)" onmouseout="hidemenu(e)" >
<asp:ImageButton ID="imgDemographics" runat="server" ImageUrl="../App_Themes/MainTheme/Images/icon_dp_d.png" /><br />
Demographics
</div>
<script type="text/javascript" language="javascript">
function showMenu(e)
{
var contextMenu = $find("<%= mnuDemographic.ClientID %>");
if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget)))
{
contextMenu.showAt(e.screenX - 40, e.screenY - 120);
}
// $telerik.cancelRawEvent(e);
}
function hidemenu(e)
{
var contextMenu = $find("<%= mnuDemographic.ClientID %>");
if ((!e.relatedTarget) || (!$telerik.isDescendantOrSelf(contextMenu.get_element(), e.relatedTarget)))
{
contextMenu.hide();
}
}
</script>
<
telerik:RadContextMenu ID="mnuDemographic" runat="server" Skin="Default" Flow="Vertical"
CausesValidation="False" onclientshowing="OnClientShowingHandler">
<Items>
<telerik:RadMenuItem runat="server" Text="Enrollment" Value="1">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Free Reduced Lunch" Value="2">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Attendance" Value="3">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Drop Outs/Graduation Rate" Value="4">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Mobility" Value="5">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Referrals" Value="6">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Retentions" Value="7">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Programs" Value="8">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Staff" Value="9">
</telerik:RadMenuItem>
<telerik:RadMenuItem runat="server" Text="Generate Demographic Profile" Value="10">
</telerik:RadMenuItem>
</Items>
</telerik:RadContextMenu>
Thanks