Código Javascript:
Ver original
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script> $(document).ready(function(){ $('a#menu-' +item).click(function(){ $(this).addClass('active'); }); }); </script> <div id="menu"> <a id="menu-home" href="#" onclick="menu('home');"><img src="<?=$url?>assets/images/icons/credits.png" style="margin-top:5px;">Inicio</a> <a id="menu-news" href="#" onclick="menu('news');"><img src="<?=$url?>assets/images/icons/news.png" style="margin-top:5px;">Noticias</a> <a id="menu-comunidad" href="#" onclick="menu('comunidad');"><img src="<?=$url?>assets/images/icons/community2.png">Comunidad</a> <a id="menu-shop" href="#" onclick="menu('shop');"><img src="<?=$url?>assets/images/icons/duckets.png" style="margin-top:5px;">Duckets</a> </div>