title: JQuery hashchange event - where to place?
body: <p>I am using JQuery hashchange event.</p>
  
  <pre><code>$(window).on('hashchange', function () {
  //do something
  });
  </code></pre>
  
  <p>When my url contains a hash during first time load I understand that this needs to be triggered with <code>$(window).hashchange();</code></p>
  
  <p>Can I place it inside document ready instead?</p>
  
  <pre><code>$(document).ready(function () {
      $(window).on('hashchange', function () {
      //do something
      });
  });
  </code></pre>