I have an issue with my child menus.When I click a child menu it becomes active after http request but I want it to remain expanded after http request(page refresh).Menu structure is below.
<ul class="sidebar-navigation>
@foreach($parent as $parent)
<li><a href="#"></a>
<ul>
@foreach($child as $child)
@if(isset($_GET['name']) && $_GET['name'] == $child->name)
<li class="active">
@endif
<a href="http:example.com?name=$child->name"></a>
</li>
@endforeach
</ul>
</li>
@endforeach
</ul>
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire