title: Jquery scroll to top animate
body: <p>Hi I know this question has been asked and answered a lot but even with that I can't seem to figure out where i'm going wrong. I'm trying to create a scrollTop animation using the "back to top" button at the end of the page but it doesn't seem to be working.</p>
  
  <p>The code is as follows:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;h2 class="bottom-border extra-bottom-margin"&gt;&lt;a href="#" class="go-to-top"&gt;Back to top&lt;/a&gt;&lt;/h2&gt;.
  </code></pre>
  
  <p>JQUERY</p>
  
  <pre><code>&lt;script&gt;
  $(function(){
  $(".go-to-top").click(function(event){
      event.preventDefault();
      $("html, body").animate({"scrollTop": "0px"}, 100);
  })
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The URL is <a href="http://mike-griffin.com/about-me.html" rel="nofollow">http://mike-griffin.com/about-me.html</a></p>
  
  <p>Any help at all would be greatly appreciated. Thank you in advance!</p>