Home>

Implementation to make in-page links smooth animation
I tried to implement the following source with Jquery, but I get the error statement $(...). Animate is not a function.
Please teach me what to do

What I tried
-Check that the Jquery file is not slim (because it seems that animation functions cannot be used)

 $('# navigation ul li a'). click (function () {
    var speed = 400;
    var href = $(this) .attr ("href");
    var target = $(href == "#" || href == ""?'html': href);
    var position = target.offset (). top;
    $('body, html'). animate ({scrollTop: position}, speed,'swing');
    return false;
 });