JQuery: binding click event to multiple href's not working properly
<p>I am binding the click event to 4 href's (they have class="alink") using JQuery in the ready() event like this:
 $(".alink").click(function() {
          debugger;        });</p>

<p>I expect whenever I click on a link, the event fires. However what I notice is that sometimes it doesn't fire and when it fires, it fires 4 times. Am I not doing it right?</p>

<p><strong>EDIT:</strong></p>

<pre><code>&lt;div id="nav"&gt;
        &lt;ul&gt;
          &lt;li class="current"&gt;&lt;a href="default.aspx" title="Home" class="alink"&gt;home&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="faq.aspx"  class="alink"&gt;faq&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="" title="Webmail" class="alink"&gt;webmail&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="contactus.aspx" title="contact" class="alink"&gt;contact us&lt;/a&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/div&gt;
</code></pre>
