Answer the question
In order to leave comments, you need to log in
How to make active class when category is selected?
Good afternoon
I made a category list like this:
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#collapse2">Ðлектрика</a>
</h4>
</div>
<div id="collapse2" class="panel-collapse collapse">
<ul class="list-group">
<?php foreach ($categories2 as $categoryItem): ?>
<li class="list-group-item">
<a href="/category2/<?php echo $categoryItem['id'];?>">
<?php echo $categoryItem['name'];?>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question