Appends an item to a Menu in the specified referenceItem's sub menu.


<ul id="menu"></ul>
    //initialize the menu widget
    // get a reference to the menu widget
    var menu = $("#menu").data("kendoMenu");

            text: "Item 1",
            cssClass: "myClass",                         // Add custom CSS class to the item, optional, added 2012 Q3 SP1.
            url: ""                // Link URL if navigation is needed, optional.
            text: "<b>Item 2</b>",
            encoded: false,                              // Allows use of HTML for item text
            content: "text"                              // content within an item
            text: "Item 3",
            items: [{text: "Sub Item 1"},{text: "Sub Item 2"}] //Sub items
            text: "Item 4",
            spriteCssClass: "imageClass3"                // Item image sprite CSS class, optional.


item Object|Array

Item to be appended, specified as a JSON object. An array of objects can also be passed.

referenceItem String|jQuery (optional)

A reference item to append the new item in. If omitted, the new item will be appended to the as a root item.


kendo.ui.Menu Returns the Menu object to support chaining.

In this article