JQuery scrollTop Function Not Working Onclick a Tag
<p>I want when I click on a tag its scroll me down to <code>mydiv</code> with animation I tried but my code didn't work please check this and help me out  </p>

<pre><code>&lt;a id="myButton" &gt;CLICK ME&lt;/a&gt;
&lt;div class="oneDiv"&gt;yyy&lt;/div&gt;
&lt;div id="mydiv"&gt;xxx&lt;/div&gt;

.oneDiv {
    background-color:orange;
    height:800px;
    width:100%;
}
#mydiv {
    background-color:green;
    width:100%;
    height:200px;
}

$(function)(){
      $("#myButton").on("click", function(){
        $("html body").animate({"scrollTop":$("#mydiv").offset().top},1000);
        return false;
      });
    });
</code></pre>