This is a migrated thread and some comments may be shown as answers.

how to determine when mouse has left the RadMenu

2 Answers 104 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Brian Mila
Top achievements
Rank 1
Brian Mila asked on 04 Feb 2010, 08:36 PM
Is there an easy way to determine when the mouse has completely left the menu?   The MouseOut event gets fired when moving from one menu item to the next, so the mouse may or may not have completely left the menu.  How can I determine for sure that the mouse isn't over the menu, or any child menus?

Thanks,
Brian

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 05 Feb 2010, 02:30 PM
Hi Brian,

Please, try the following jQuery solution, where RadMenu1 is the ID of the menu:

function pageLoad() 
      {
          $telerik.$('#RadMenu1').bind("mouseleave", function() {
              alert('mouseout for the menu');
          });
      }

Note that you have to bind the mouseleave instead of mouseout. The difference between the two events is explained in detail in the following links:

mouseout
http://api.jquery.com/mouseout/

mouseleave
http://api.jquery.com/mouseleave/



Greetings,
Peter
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
0
Brian Mila
Top achievements
Rank 1
answered on 07 Feb 2010, 02:14 AM
Thanks Peter,  that is exactly what I was looking for!  Although I had to use syntax to get the radmenu:

$("#<%=RadMenu.ClientID %>").bind("mouseleave", mouseLeave);

Thanks for the quick reply, Telerik support is second to none!

Brian
Tags
Menu
Asked by
Brian Mila
Top achievements
Rank 1
Answers by
Peter
Telerik team
Brian Mila
Top achievements
Rank 1
Share this question
or