Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
141707 | Dec 29,2018 03:01 AM UTC | Jan 5,2019 08:42 AM UTC | ASP.NET Core - EJ 2 | 3 |
![]() |
Tags: Menu Bar |
<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" }
}
},
// ..
}; |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.