title: Change URL for autoscroll (pushstate?)
body: <p>I am currently using this code I found to autoscroll to anchors:</p>
  
  <pre><code>$(function() {
      $('nav a[href*=#]').bind('click',function(event){
          var $anchor = $(this);
  
          $('html, body').stop().animate({
              scrollTop: $($anchor.attr('href')).offset().top - 100
          }, 1000);
          event.preventDefault();
  
      });
  });
  </code></pre>
  
  <p>What can I add to make sure that the #anchor gets added to the URL when clicked?</p>
  
  <p>I have seen this used, but I'm not sure how to add it..</p>
  
  <pre><code>function() {
          if(history.pushState) {
              history.pushState(null, null, target);
          }
          else {
              location.hash = target;
          }
        });
  </code></pre>
  
  <p>Thanks very much!!!</p>