Menu with anchor href, does not work when it is on the same page

1

I have menu that stays in an include and if I am in the home and I click on one of the options goes right to the desired page, only that when I am on the page itself only works the first link which is what I am the rest not . Do you have to put some jquery HREF to work?

MENU

            <ul>
                <li><a title="unica">unica</a></li>
                <li><a href="unica.php#tabs-1" title="Histórico e Missão">Histórico e Missão</a></li>
                <li><a href="unica.php#tabs-2" title="Equipe">Equipe</a></li>
                <li><a href="unica.php#tabs-3" title="Conselheiros">Conselheiros</a></li>
                <li><a href="unica.php#tabs-4" title="Sindicatos">Sindicatos</a></li>
                <li><a href="unica.php#tabs-5" title="Contatos">Contatos</a></li>
            </ul>

<div id="tabs-1"></div>
<div id="tabs-2"></div>
<div id="tabs-3"></div>

JQUERY CODE

<script>
$(document).ready(function(){
    $("UL LI A").click(function(){
        $("#tabs").attr("href", "http://localhost/unica/unica.php");
    });
});
</script>
    
asked by anonymous 20.09.2018 / 18:57

0 answers