In jQuery, I\'d like to select all groups of radio buttons where there are no buttons checked.
Or, is there a way in which I can select all radio button groups and i
To select all radio by group name and obtain only the list of different names:
function selectRadioByGroupName() {
return $.unique($('input:radio').map(function(index, element) {
return this.name;
}));
}
An example snippet:
function selectRadioByGroupName() {
return $.unique($('input:radio').map(function(index, element) {
return this.name;
}));
}
$(function () {
selectRadioByGroupName().each(function(index, element) {
$('body').append($('First Group name is: ' + element + '
'));
});
});
After getting the different group names it's possible to cycle on them.