I need to make sure that all the radio groups have been answered before I enable the submit button. If I have:
var radioBtns = $(\'input\').filter(\':radio\
not very neat way but still you can use it
$("input:button").click(function(){
var v =$('input[name="a"]').filter(':checked');
var vr =$('input[name="b"]').filter(':checked');
if(v.length==0)
{
alert("select a group");
}else alert("very good");
if(vr.length==0)
{
alert(" o come on ");
}else alert("guud");
});
FIDDLE