title: Handling fragment hash in jQuery
body: <p>I am populating a div element called content based on a click event in a text menu.   This is working fine but I would like to handle these scenarios:</p>
  
  <ol>
  <li>Refreshing page with # fragment in URL.  Currently, it results in a blank div.</li>
  <li>Going to the page without # fragment in URL should show populate the div with blog.php </li>
  </ol>
  
  <p>Thanks in advance</p>
  
  <p>Code</p>
  
  <pre><code>&lt;!-- Transparent box --&gt;
  &lt;div id="box"&gt;
  
  &lt;!-- Menu --&gt;
  &lt;a href="#blog" onclick="$('#content').load('blog.php')"&gt;blog&lt;/a&gt; |
  &lt;a href="#code" onclick="$('#content').load('code.php')"&gt;code&lt;/a&gt; |
  &lt;a href="#portfolio" onclick="$('#content').load('portfolio.php')"&gt;portfolio&lt;/a&gt; |
  &lt;a href="#about" onclick="$('#content').load('about.php')"&gt;about&lt;/a&gt;
  
  &lt;div class="bar"&gt;&lt;/div&gt;
  
  &lt;!-- Content --&gt;
  &lt;div id="content"&gt;&lt;/div&gt;
  
  &lt;div class="bar" id="footer"&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>