Check whether radio button is checked or not in jquery
<pre><code> &lt;input type="radio" name="a" /&gt;
 &lt;input type="radio" name="a" /&gt;
 &lt;input type="radio" name="b" /&gt;
 &lt;input type="radio" name="b" /&gt;
</code></pre>

<p>I want to make sure that the <code>both group</code> of <code>radiobutton</code> must be checked, for this i tried :</p>

<pre><code>if($("input[type=radio,name=a]:checked").length &gt; 0 &amp;&amp; 
   $("input[type=radio,name=b]:checked").length &gt; 0)
{    
/* do something */
}
</code></pre>

<p>But not working , can anybody tell me why?</p>
