Hello Piyush,
You can add one or several items directly (along with sub items, images, sprites, etc) by passing a JSON object as a Menu dataSource, like this:
$("#menu").kendoMenu({
dataSource: [{
text: "Item 1",
url: "http://www.kendoui.com" // Link URL if navigation is needed, optional.
},
{
text: "Item 2",
imageUrl: "http://www.kendoui.com/test.jpg", // Item image URL, optional.
items: [{ // Sub item collection
text: "Sub Item 1"
},
{
text: "Sub Item 2"
}]
},
{
text: "Item 3",
spriteCssClass: "imageClass3" // Item image sprite CSS class, optional.
}]
});
The same JSON object can be used in append() too. Our documentation will get these updates soon.
All the best,
Kamen Bundev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework -
download Kendo UI now!