How to make an event handler fire only once in JQuery for the Selectors with multiple items?
<p>I have following JQUERY code. </p>

<pre><code>&lt;script type="text/javascript"&gt;
    $(".voteup").click(function(){
        alert($(this).parents(".webresource").attr("id"));
    });
&lt;/script&gt;
</code></pre>

<p>The page has 4 elements with classname voteup. But when I click on one of them, alert is displayed four times. I would think that there is only one click so the event handler function would execute only once. </p>

<p>What do I do to ensure that the event handler function is executed only once.</p>
