How to fire an event just once, when having multiple objects selected?

How to fire an event just once, when having multiple objects selected?

I have a problem and I've spent quite a lot of time trying to solve it, without any success.

I have this code

  1. <script type="text/javascript">
      jQuery(document).ready(function()
      {
        $("select").click(function()
        {
          alert($(this).attr('id'));
        });
      });
    </script>








  2. <FORM><select name="category" id="#link1">
  3. <option value=1>1</option>
  4. <option value=2>2</option>
  5. </select></FORM>
  6. <FORM><select name="category" id="#link2">
  7. <option value=1>1</option>
  8. <option value=2>2</option>
  9. </select></FORM>
  10. <FORM><select name="category" id="#link3">
  11. <option value=1>1</option>
  12. <option value=2>2</option>
  13. </select></FORM>
When I click on any of the select fields, I always get 3 subsequent alerts, each with the id of the clicked select field. What I would like is to have only 1 alert with the clicked select id, whenever I click it.
How to do that?