title: Scroll to link with skrollr
body: <p>I am using <a href="https://github.com/Prinzhorn/skrollr" rel="noreferrer">https://github.com/Prinzhorn/skrollr</a> to animate the background of my site as I scroll. However I am also wanting to have my links scroll up and down the page like a normal single page site would do.</p>
  
  <p>The problem is that both are working if I manually scroll the background changes, if I click the link the page scrolls to the correct place. The problem is that when I click the button the background doesn't scroll as well.</p>
  
  <p>It seems like I am working with two different scroll functions and as a result they aren't working together and I need to use the same one.</p>
  
  <p>Here is the code.</p>
  
  <p>js - Scroll to link:</p>
  
  <pre><code>var $root = $('html, body');
      $('a').click(function() {
          var href = $.attr(this, 'href');
          $root.animate({
              scrollTop: $(href).offset().top
          }, 500, function () {
              window.location.hash = href;
          });
          return false;
      });
  </code></pre>
  
  <p>js – Skrollr init</p>
  
  <pre><code>skrollr.init({
      smoothScrolling: true,
      forceHeight: true
  }); 
  </code></pre>
  
  <p>I will try put together a fiddle to make it more clear but hopefully the answer is really simple.</p>