<ejs-menu id="menu" cssClass="customCss" items="ViewBag.data" fields="ViewBag.menuFields" select="onSelect"></ejs-menu>
<style>
.customCss ul.e-menu {
font-style: italic;
color: blue;
}
</style> |
<ejs-menu id="menu" cssClass="customCss" items="ViewBag.data" fields="ViewBag.menuFields" select="onSelect"></ejs-menu>
<script>
function onSelect(args) {
if (args.item.action)
window.location.rel='nofollow' href = window.location.rel='nofollow' href + "/" + args.item.controller + "/"+args.item.action + "?name=" + args.item.parameter; // Set the URL
}
</script> |
List<object> data = new List<object>() {
new {
header = "Events",
subItems = new List<object>() {
new { text= "Conferences", action = "conference", parameter = "conferenceName", controller = "Home"},
new { text= "Music", action = "music", parameter = "instrumentName", controller = "Home" },
new { text= "Workshops" }
}
},
// ..
}; |