how to determine when mouse has left the RadMenu

3 posts, 1 answers
  1. Brian Mila
    Brian Mila avatar
    6 posts
    Member since:
    Apr 2009

    Posted 04 Feb 2010 Link to this post

    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. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 05 Feb 2010 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Brian Mila
    Brian Mila avatar
    6 posts
    Member since:
    Apr 2009

    Posted 06 Feb 2010 Link to this post

    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
Back to Top