I dynamically rendered HTML that lists an indefinite number of radio buttons whose names are some identifiers in the database.
I need to collect all the unique names of the radio stations.
Here is an example:
<input name="721" type="radio" value="A" /> <input name="721" type="radio" value="I" /> <input name="722" type="radio" value="A" /> <input name="722" type="radio" value="I" /> <input name="723" type="radio" value="A" /> <input name="723" type="radio" value="I" />
Checking radio stations is NOT required, so using the selected or verified attribute will not work.
Is there an elegant way to get all the unique radio station names using jQuery? I know that I can just skip all the radio stations, but I hope jQuery has a more elegant way to do this?
source share