title: Click event only working on one element?
body: <p>I have wasted 1 hour on api.jquery.com and my script to identify the problem but still unable.</p>
  
  <p>Here is my <strong>script.js</strong></p>
  
  <pre><code>// DOM ready
  
  $(function(){
  
      // gets categories from server
      $.post("category.php", function(data) {
          $("#category ul").html(data);
      });
  
      // tests click event
      $("a").click(function(evt) {
          alert("Handler for .click() called.");
          evt.preventDefault();
      });
  
  });
  </code></pre>
  
  <p>In index.php there are 4 anchor tags first three loaded from server as you can see in script and the last on is preloaded(static)(not loaded from server). Problem is that I have selected all anchor elements in jQuery selector as you can see in script but my event is only working with the last anchor tag which is pre-loaded. What is wrong ? Why the event is not working with the first three anchor tags ?</p>