I have a menu where when an item is selected, a div appears for that item. But I would like this item to be marked. Trying for PHP, I did this:
<a href="?k=0">Todos</a>
<a href="?k=1">Alunos</a>
<a href="?k=2">Professores</a>
<a href="?k=3">Responsáveis</a>
And in PHP:
switch(isset($_GET['k'])){
case "0" : $ativo0 = "class=\"uk-active\""; break;
case "1" : $ativo1 = "class=\"uk-active\""; break;
case "2" : $ativo2 = "class=\"uk-active\""; break;
case "3" : $ativo3 = "class=\"uk-active\""; break;
default : $ativo0 = "class=\"uk-active\"";
}
No < li > referring to each item:
<li <?php echo $ativo0; ?>>....</li>
<li <?php echo $ativo1; ?>>....</li>
<li <?php echo $ativo2; ?>>....</li>
<li <?php echo $ativo3; ?>>....</li>
Only he leaves only the $ active1