I have a multiple rows of radio boxes like this
<input id="m_0" type="radio" value="m" name="c_0">
<input id="f_0" type="radio" value="f" name="c_0">
<input id="m_1" type="radio" value="m" name="c_1">
<input id="f_1" type="radio" value="f" name="c_1">
<input id="m_2" type="radio" value="m" name="c_2">
<input id="f_2" type="radio" value="f" name="c_2">
So, I want to validate if the radio has been selected in each row
I tried this way - if ($('input:radio[name="c_"+i]:checked').val()) {
where i = 0,1,2... but it didn't work
any idea how can I change it to work? thanks.