[jQuery] Getting all labels
I want to get all labels in a form, and then access their "for"
attribute to link it to the field.
I thought that $("label") would give me an array of all label elements
that I could loop through and get the "for" value. But this does not
work and I know I am missing something fundamental to Jquery.
If I do:
$("label").attr("for");
It gives me the first label in the fieldset, which is confusing.