You are using the "
id selector", which by definition (if HTML is correct) always give one control. But you can use other selectors which gives you a set of controls. For example,
class selector will give you all element of certain CSS class, and
element selector will give you all elements with certain HTML tag.
Please see:
http://api.jquery.com/category/selectors/[
^].
In such cases, you will select a set of elements. Now, you can apply the method
.each
method to obtained set, which allows you to apply the same method to all elements. Please see:
http://api.jquery.com/each/[
^].
The code sample is available in the last article referenced above.
Good luck,
—SA