I have a Ci script outputting database values. On these values '#commentLink' and '#commentBox' are outputted in ever iteration of the Ci outputted data. How would I identify which commentLink and commentBox is which. Right now if you click the first commentLink, it selects the first commentBox. and when you click the 20th commentLink it selects the first commentBox. I need the 20th commentLink to select the 20th commentBox.
So How would I iterate over the values? Is there a way to identify the outputted rows using a unique id and use .each() or something of the nature?
$("#commentLink").click(function() {
$("#commentBox").focus();
});