Hello
I'm currently working on a project that includes RadMenu.
The functionality that I want is this:
Only when I click on the item it will open and not by mouse hover. (Each tab separately).
My ASPX code:
JS code:
My problem is that when one item is already opened, and I move the mouse away and back , and then click on it, it does not recognize that it is already opened, and opens again.
How do I fix this?
Pseudo code like this:
if radmenuitem.isOpen == true
radmenuitem.close
Thanks,
Daniel.
I'm currently working on a project that includes RadMenu.
The functionality that I want is this:
Only when I click on the item it will open and not by mouse hover. (Each tab separately).
My ASPX code:
01.
<
telerik:RadMenu
ID
=
"RadMenu1"
Runat
=
"server"
ClickToOpen
=
"True"
OnClientMouseOver
=
"OnClientMouseOverHandler"
style
=
"top: 0px; left: 0px; width: 414px; height: 40px"
>
02.
<
Items
>
03.
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Root RadMenuItem1"
>
04.
<
ContentTemplate
>
05.
<
div
id
=
"NewsWrapper"
class
=
"Wrapper"
>
06.
sdfsdfsdfs
07.
08.
<
a
class
=
"moreLink"
href
=
"#"
>View all »</
a
>
09.
</
div
>
10.
</
ContentTemplate
>
11.
</
telerik:RadMenuItem
>
12.
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Root RadMenuItem2"
>
13.
<
ContentTemplate
>
14.
<
div
id
=
"Div1"
class
=
"Wrapper"
>
15.
sdfsdfsdfs
16.
17.
<
a
class
=
"moreLink"
href
=
"#"
>View all »</
a
>
18.
</
div
>
19.
</
ContentTemplate
>
20.
</
telerik:RadMenuItem
>
21.
<
telerik:RadMenuItem
runat
=
"server"
Text
=
"Root RadMenuItem3"
>
22.
<
ContentTemplate
>
23.
<
div
id
=
"Div2"
class
=
"Wrapper"
>
24.
sdfsdfsdfs
25.
26.
<
a
class
=
"moreLink"
href
=
"#"
>View all »</
a
>
27.
</
div
>
28.
</
ContentTemplate
>
29.
</
telerik:RadMenuItem
>
30.
</
Items
>
31.
</
telerik:RadMenu
>
JS code:
01.
<script type=
"text/javascript"
>
02.
function
OnClientMouseOverHandler(sender, eventArgs) {
03.
if
(eventArgs.get_item().get_parent() == sender) {
04.
sender.set_clicked(
false
);
05.
}
06.
}
07.
08.
09.
</script>
My problem is that when one item is already opened, and I move the mouse away and back , and then click on it, it does not recognize that it is already opened, and opens again.
How do I fix this?
Pseudo code like this:
if radmenuitem.isOpen == true
radmenuitem.close
Thanks,
Daniel.