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

RadMenu ClickToOpen Mouseout to close

1 Answer 89 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Nona
Top achievements
Rank 1
Nona asked on 27 Jun 2012, 03:39 PM
Hi,

I've been trying to figure out how to make the RadMenu expand on click, but close when the mouse moves away from the child item.

I have been able to get it to work with a regular RadMenuItem as a child Item.

However my child item is a custom Item Template.  With the custom item template, the Mouseover/out events just don't seem to fire.

I have found some jquery methods to put on the div's in my custom item template, however, I'm not sure how to close the menu from inside the jquery event, since I don't have a reference to the radmenu or radmenuitem.

I've searched long and hard on this site and others to figure out a solution.

Thanks,
Nona

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 28 Jun 2012, 04:17 AM
Hi Nona,

Try the following code snippet to achieve your scenario.

JS:
<script type="text/javascript" >   
   $('.rmTemplate').hover(
         function () {
         },
         function ()
         {
             var menu = $find("<%=RadMenu1.ClientID %>");
             menu.close();
         }
     );
</script>

Thanks,
Princy.
Tags
Menu
Asked by
Nona
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or