lundi 26 août 2019

Laravel sidebar set active tab when page are open

How can I set active selected tab and and also open the sub tab if the page I'm on is a sub page on my sidebar? For example if I open Contractor Association page, the Users tab should expand the highlight Contractor Association tab. Right now every time I open a new page the sidebar is will reset back

 <ul class="navbar-nav">
    <li class="nav-item">
        <a class="nav-link "
            href="">
            <i class="ni ni-tv-2"></i> 
        </a>
    </li>
    <li class="nav-item">
        <a class="nav-link "
            href="#users" data-toggle="collapse" role="button" aria-expanded="true" aria-controls="users">
            <i class="fa fa-users"></i>
            <span class="nav-link-text"></span>
        </a>
        <div class="collapse "
            id="users">
            <ul class="nav nav-sm flex-column">
                <li class="nav-item">
                    <a class="nav-link "
                        href="">
                        
                    </a>
                    <a class="nav-link "
                        href="">
                        
                    </a>
                    <a class="nav-link "
                        href="">
                        
                    </a>
                </li>
            </ul>
        </div>
    </li>
</ul>



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire