title: Smooth scroll work not correctly when using window.location.hash
body: <p>I do smooth scroll. But it work not correctly. 
  It only triggered when you press a second time, but hash change instantly in url.</p>
  
  <pre><code>$('nav').click(function(e){
          if(window.location.hash == "#block1") {
              $('html,body').animate({
                  scrollTop: ($('#block1').offset().top)
              })
          }
          else if(window.location.hash == "#block2") {
              $('html,body').animate({
                  scrollTop: ($('#block2').offset().top)
          })
          }
      })
  </code></pre>