title: Why does my jQuery alert show twice?
body: <p>I am using jQuery. I have a problem when alerts the IDs of a list shows two times, instead of once.</p>
  
  <p>The list:</p>
  
  <pre><code>&lt;ul id="testnav"&gt;
      &lt;li&gt; &lt;a href="#"&gt;Page 1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt; &lt;a href="#"&gt;Page2..&lt;/a&gt;
          &lt;ul id="subnav"&gt;
              &lt;li id="content_1"&gt;&lt;a href="#"&gt; Page3&lt;/a&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>The code:</p>
  
  <pre><code>$("li").click(function(){
      var current_id = $(this).attr('id');
      alert(current_id);
      // These alert two times, one is empty and another one is content_1
  });
  </code></pre>
  
  <p>Why dopes the code alert two times? How do I make it execute a single time?</p>