title: Losing click even when page is loaded with ajax
body: <p>I have a page with a left nav which has two links and a main div. The main div is updated with content from the server whenever user clicks a link in the left nav. I use pjax for this.</p>
  
  <p>When user initially comes to this page, the main div has a link with id <code>somelink</code> that shows an alert box when the user clicks the hyperlink. This is accomplished by this code:</p>
  
  <pre><code>   $(document).ready(function() { 
      .....
      $('#somelink').click(function (event){
         alert("here");
      });
       ....
     });
  </code></pre>
  
  <p>When the second link on the nav bar is clicked, I load content from the server and update the main div. When user clicks first link, again I load content from the server and update the main div. However, this time when I click <code>somelink</code> nothing happens. Its as if jQuery isn't able to detect that there is a link with id <code>somelink</code> because it was loaded via ajax. </p>
  
  <p>Is there a way to overcome this?</p>