Hi this is sending me around in circles.
Consider these radio buttons:
<input type="radio" class="win" id="50" value="1" name="match1" />
<input type="radio" class="cover" id="50" value="2" name="match1" />
<input type="radio" class="win" id="51" value="1" name="match2" />
<input type="radio" class="cover" id="51" value="2" name="match2" />
<input type="radio" class="win" id="52" value="1" name="match3" />
<input type="radio" class="cover" id="52" value="2" name="match3" />
When the form is submitted I want to know the id of any of the buttons which are selected.
Some of the button pairs may not be selected at all.
I tried:
for (var x=1; x<4; ++x){
if($('form #'+$(this).attr("id")+'input:radio[name=match'+x+']').prop('checked', true)){
alert('Checked;);
}
}
But it always evlautes to true.
Thanks