Get selected radio buttons of certain class

javascript, jquery

Solution

According to JQuery documentation.

The `:selected` selector works for option elements. It does not work for checkboxes or radio inputs;

Try:

$("input:radio.someClass:checked");

Problem

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?

Original source