+ Start a Discussion
anil Kumaranil Kumar 

how to highlight active tab in custom navigation bar in lightning component

Hi All,

We have custom navigation bar in lighting community. Onclick of each tab we are navigating to different URLs. How to highlight active tab in custom navigation bar in lightning. Below is my code.

 <nav id="ddmenu" class="ddmenu">
    <ul class="ddmenu_ul" aura:id="mobile_ddmenu_ul">
        <li class="mobile_navbar-brand no-sub" style="display:none;width: 370px;">
        <a class="top-heading" href="{!$Label.c.Home}" onclick="{!c.menuClose}">Home</a>
        </li>

        <li class="no-sub" style="width: 170px;" onclick="{!c.menuClose}" >
            <a class="top-heading" href="{!$Label.c.SalesforceArticles}">Salesforce Articles </a>
        </li>
        <li class="no-sub" style="width: 170px;" onclick="{!c.menuClose}">
            <a class="top-heading" href="{!$Label.c.My_Training}">My Training</a>
        </li>
        <li class="no-sub" style="width: 170px;" onclick="{!c.menuClose}">
            <a class="top-heading" href="{!$Label.c.To_myTeam}">My Team</a>
        </li>
    </ul>
</nav>

Thanks,
Anil Kumar