Thanks,
Jeff
7 Answers, 1 is accepted
Thanks,
Jeff
To make the RadNavigation nodes collapse on click you can subscribe to the control's OnClientNodeClicked event and call the _collapseAll method in its event handler as shown below:
function
OnClientNodeClicked(sender, eventArgs) {
if
(eventArgs.get_node().get_level() > 0) {
sender
._collapseAll();
}
}
<
telerik:RadNavigation
ID
=
"RadNavigation1"
runat
=
"server"
OnClientNodeClicked
=
"OnClientNodeClicked"
>
Regards,
Ivan Danchev
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
Hi Ivan,
This technique doesn't appear to work on the hamburger menu when there is a second level. It closes the second level but NOT the main hamburger menu. How do you force that to hide?
Regards
Jon
Ah, I've realised that the hamburger isn't a normal node and that would explain it not collapsing. I've now found the _collapseSandwich function and used that, works very well now.
Is this going to be added as a proper function so that it doesn't get dropped after any internal rewrites? I always get worried about using the underscore functions.
Regards
Jon
Thank you for your concern with RadControls - we will do our best to add public methods for expand and collapse of the MenuButton or the "sandwich" as soon as possible.
Regards,
Plamen
Telerik
Many thanks Plamen
Regards
Jon