I'm using the following to remove a group of textboxes and labels in a "li" but I'd like to know the ID of any one of the elements in that group. The solution to that might be enough for me to figure out the next step.

My next step: Each group of elements has a counter number assigned to it (e.g. textbox1 and label1 are in one grouping, then textbox2 and label2 in another). If the second group of elements are removed, I want to know the id of at least one of the elements so I can rename all the elements in the next group with "2" instead of letting them remain with "3" and continue doing that with the rest of the groups of elements so there is no gap in the sequence unless there is a better way to "shift" the assigned numbers with a simpler method.

```
$("<a>CLICK HERE TO REMOVE THIS ENTRY</a>").click(function() {
    $(this).closest("li").remove();
}).appendTo(li);

```