Topic: SideNav keep selected item highlighted
garrithsteyn pro asked 7 years ago
Marta Wierzbicka staff answered 6 years ago
.current-menu-item {
background: #33b5e5;
}
Jquery:
$(document).ready(function () {
$('.side-nav .collapsible li .collapsible-body ul li').click(function(e) {
$('.side-nav .collapsible li .collapsible-body ul li.current-menu-item').removeClass('current-menu-item')
$(this).closest('li').addClass('current-menu-item');
});
});
Best,
Marta
Marta Wierzbicka staff answered 7 years ago
.active
like here:
<li><a class="collapsible-header waves-effect arrow-r active"><i class="fa fa-home"></i> Homepages<i class="fa fa-angle-down rotate-icon"></i></a>
<div class="collapsible-body">
<ul>
<li><a href="" class="waves-effect active">Default Homepage</a>
</li>
<li><a href="" class="waves-effect">Full Width Homepage</a>
</li>
Best,
Marta
Adam Adamczyk free commented 7 years ago
With the latest version active class on item level seems to be not working - at least I do not see any difference.Marta Wierzbicka staff commented 7 years ago
Hi, so how would you like this to look like? Best, MartaFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No