title: Jquery Hash Navigation
body: <p>I have a simple javascript function to get hash variables:</p>
  
  <pre><code>$(document).ready(function(){
      $("a").click(function(){
          nav_anchor()
      });
      function nav_anchor() {
          var aurl = location.hash;
          aurl = aurl.split('#');
          if (aurl[1]) { alert(aurl[1]); }
          else { alert("Empty");  }
      }
  }); 
  </code></pre>
  
  <pre class="lang-html prettyprint-override"><code>&lt;a href="#a=1&amp;aa=10"&gt;11111111111&lt;/a&gt;
  &lt;a href="#b=1&amp;bb=10"&gt;22222222222222&lt;/a&gt;
  &lt;a href="#c=1&amp;cc=10"&gt;333333333&lt;/a&gt;
  </code></pre>
  
  <p>But if I click in the link I receive the previous var.</p>
  
  <p>Example:</p>
  
  <p>If my first Click is <code>11111</code> I receive message <code>Empty</code> and if my second click is <code>222222</code> I receive <code>a=1&amp;aa=10</code></p>