Executing an action in Jquery when clicking on a link

0

I want you to click on some of the menu links on my site, run the scrollTop.

$(document).ready(function() {
    $(".menu-topo a").click(function() {
        $('html, body').animate({
            scrollTop: (400)
        }, 2000);
    });
});

It turns out that the effect is happening before and soon after page changes, what I really want is when you click on some of the links that are on the menu, the page loads and then the effect happens.

    
asked by anonymous 19.02.2015 / 14:37

0 answers