Currently, I am utilizing the Kendo Menu feature to create a customized menu. To style the selected item in the menu, I have incorporated the following code:
$("#menu").kendoMenu({
select: function (e) {
// Remove previously selected options for this menu
$(".k-state-selected", this.element).removeClass("k-state-selected");
// Select item
$(e.item).addClass("k-state-selected")
}
});
.k-menu .k-state-selected> .k-link {
color: lightcoral;
}
Using the above code snippet, I have successfully applied styles to the selected items in the menu.
However, I now face a new challenge. Each parent item in the menu has sub-items, and when I select a sub-item, I want the parent item to also inherit these styles. Could someone provide guidance on how to achieve this?