title: jquery scroll to position on page on anchor click
body: <p>I am trying to create an anchor link that when clicked will scroll down the page. </p>
  
  <p>the script: </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;                         
  $(document).ready(function() {
      function scrollWin(){
          $('html,body').animate({
              scrollTop: $("#scrollToHere").offset().top
          }, 800);
      }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>the link:</p>
  
  <pre><code>&lt;a class="icon_button" href="#"  onclick="scrollWin();" &gt;&lt;i class="icon-chevron-down "&gt;&lt;/i&gt; &lt;/a&gt;
  </code></pre>
  
  <p>and then the div to be scrolled to:</p>
  
  <pre><code>&lt;div id="scrollToHere"&gt;
  Scroll to here
  &lt;/div&gt;
  </code></pre>
  
  <p>What am I missing?</p>