How do I change .click() for multiple links?

How do I change .click() for multiple links?

Hi

I have a <ul> with some "<li><a href="xxx"></a></li>"s in it. I want to change what happens when you klick any of those links. I tried:

jQuery.each($("#services ul li a"), function(index, value) {
   
   //alert("index: " + index + "\nvalue: " + value);
   
   value.click(function() {
      select_item(index);
   });
   
});


This should call select_item() with an id when clicking any of the links, nut it just won't work. When I uncomment the alert I can see 'value' is not the <a> element, but the href it refers to. Is that the problem? How can I deal with it?

Thanks
Luke