Basically, when I load my page and then drop either my external collapsible menu ( .admin) or the nested reset menu ( .unitsofstudy), it does not update the glyphicon that I set using :afterif I don't switch it twice.
Someone can take a look and see if they can determine where I ruined it; I’ve been trying to fix it for several hours, but to no avail. If you need more information, let me know.
HTML:
<div id="sidebar-collapse" class="col-sm-3 col-lg-2 sidebar">
<ul class="nav menu" id="navmenu-sidebar">
<li>
<a class="admin" data-toggle="collapse" href="#admin"><i class="fa fa-tasks" style="margin-right: 16px;"></i>Admin</a>
<ul id="admin" class="nav collapse">
<li>
<a class="unitsofstudy" data-toggle="collapse" href="#unitsofstudy"> <i class="fa fa-book" style="margin-right: 12px;"></i>Units of Study</a>
<ul id="unitsofstudy" class="nav collapse">
<li>
<a href="@Url.Content("~/Admin/Units")"> <i class="fa fa-book" style="margin-right: 8px;"></i> View Units</a>
</li>
<li>
<a href="@Url.Content("~/Admin/NewOfferedUnit")"> <i class="fa fa-plus" style="margin-right: 10px;"></i> Create Unit Offerings</a>
</li>
<li>
<a href="@Url.Content("~/Admin/NewUnit")"> <i class="fa fa-plus" style="margin-right: 10px;"></i> Register Units</a>
</li>
<li>
<a href="@Url.Content("~/Admin/NewSemester")"> <i class="fa fa-plus" style="margin-right: 10px;"></i> Register Semesters</a>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
My CSS:
.admin:after, .unitsofstudy:after {
font-family: 'Glyphicons Halflings';
content: "\e114";
float: right;
color: grey;
}
.admin.collapsed:after, .unitsofstudy.collapsed:after {
content: "\e080";
}
source
share