If it was noon and I could not find the problem, of a fact that I thought was simple. In the Jquery documentation, it says: $ ("#book") .animate ({
I have tried to put a newer, older Jquery, but, it will not. It does not work a simple scroll script that I need to implement.
function scrollToAnchor(aid) {
var aTag = $("a[name='" + aid + "']");
$('html,body').animate({
scrollTop: aTag.offsetTop
}, 'slow');
}
$("#quem-somos").on('click', function() {
scrollToAnchor('section-quem-somos');
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script><aclass="menu__item" href="#" id="quem-somos">
<span class="menu__item-name">Quem somos</span>
</a>
<section class="bloco_historia" id="section-quem-somos">Bloco</section>
It's close to the footer. If I switch to the head, it does not make a mistake, but it does not work either.