title: jquery disable radio group if MAX checked
body: <p>How can I disable a group of radio buttons if MAX values are checked? In my example I want to allow a MAX of 2 radio buttons to be checked and when 2 are checked than disable the rest.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function()
      {
          var MAX=2;              
      });
  &lt;/script&gt;
  
  &lt;form&gt;
  &lt;div&gt;
  &lt;ul&gt;
      &lt;li&gt;&lt;input type="radio" class="rbutton"  name="radio[]" value="1" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;input type="radio" class="rbutton"  name="radio[]" value="2" /&gt;&lt;/li&gt;
      &lt;li&gt;&lt;input type="radio" class="rbutton"  name="radio[]" value="3"/&gt;&lt;/li&gt;
      &lt;li&gt;&lt;input type="radio" class="rbutton"  name="radio[]" value="4" /&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>