Reputation: 1267
I am following this link bootstrap drop down menu to create a drop down menu. When I click button, a drop down list appears and when I hover mouse over drop down menu only first two list items are click able, rest of the items are seem to be disable/not click able or some thing is going wrong. Here is the code:
@if (Request.IsAuthenticated && Roles.IsUserInRole(User.Identity.Name, "teacher"))
{
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">E-portal
<span class="caret"></span>
</a>
@*<div class="dropdown">
*@
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li>@Html.ActionLink("Student", "Index", "Student")</li>
<li>@Html.ActionLink("Teacher", "Index", "Teacher")</li>
<li>@Html.ActionLink("Department", "Index", "Department")</li>
<li>@Html.ActionLink("University", "Index", "University")</li>
<li>@Html.ActionLink("Course Management", "Index", "Course")</li>
<li>@Html.ActionLink("Class Management", "Index", "Classes")</li>
</ul>
@*
</div>
*@
</div>
}
Script:
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
What should I do to get it work ?
Upvotes: 0
Views: 169
Reputation: 362290
Remove the class=dropdown
DIV..
<div class="btn-group">
<a class="btn dropdown-toggle" data-toggle="dropdown">E-portal
<span class="caret"></span>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
<li>...</li>
</ul>
</div>
http://codeply.com/go/t2GjUtK03P
Upvotes: 1