close api for kendo ui for jquery menu

1 Answer 32 Views
Menu
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL asked on 04 Aug 2024, 07:20 PM | edited on 05 Aug 2024, 07:27 PM

I looked at the demo at https://demos.telerik.com/kendo-ui/menu/orientation.

The code for this demo included the following line of code.

  • Why is this line of code necessary ?
  • What is the need of passing the parameter  $("#myMenu .k-link") to the close method? I thought we could simply call the close method without any parameters and that would close the menu.
 menu.data("kendoMenu").close($("#myMenu .k-link"));

1 Answer, 1 is accepted

Sort by
1
Accepted
Martin
Telerik team
answered on 07 Aug 2024, 10:33 AM

Hello, Suhil,

Indeed the close method can be called without any parameters to close the Menu. My guess is that the developer who coded the component has seen a case in which passing a parameter might be needed. As for the demo, again, the author of the example might have hit a case in which the Menu needs to be closed programmatically prior to changing the orientation.

Let me know if you have any further questions.

Regards,
Martin
Progress Telerik

Do you have a stake in the designеr-developer collaboration process? If so, take our survey to share your perspective and become part of this global research. You’ll be among the first to know once the results are out.
-> Start The State of Designer-Developer Collaboration Survey 2024

Tags
Menu
Asked by
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Martin
Telerik team
Share this question
or