I’m trying to get the radio buttons that has a certain class that is selected.
Getting the radio buttons of that class comes with
$("input:radio.someClass");
I thought that this would work to get the selected radio button –
$("input:radio.someClass:selected");
But that returns empty – what am I doing wrong?
According to JQuery documentation.
The
:selectedselector works for option elements. It does not work for checkboxes or radio inputs;Try: