title: Disable fields on checked
body: <p>I am trying to disable 2 select fields in a fieldset on check of a checkbox. I've also tried methods like <code>getElementById</code> or <code>getElementsByTagName</code> or <code>.attr()</code> but it doesn't work..</p>
  
  <p>I hope to add <code>disabled</code> to <code>fieldset</code> like this when on checked:</p>
  
  <pre><code>&lt;fieldset id="test" disabled&gt;
      &lt;div class="col-lg-6"&gt;
          &lt;?php echo $this-&gt;Form-&gt;input('frequency_remarks'); ?&gt;
      &lt;/div&gt;
      &lt;div class="col-lg-6"&gt;
          &lt;?php echo $this-&gt;Form-&gt;input('duration_remarks'); ?&gt;
      &lt;/div&gt;
  &lt;/fieldset&gt;
  </code></pre>
  
  <p>The checkbox:</p>
  
  <pre><code>&lt;div class="checkbox"&gt;
      &lt;label for="CommentFrequencyOk"&gt;
          &lt;input type="hidden" name="data[Comment][frequency_ok]" id="CommentFrequencyOk_" value="0" /&gt;
          &lt;input type="checkbox" name="data[Comment][frequency_ok]" class="checkbox" value="1" id="CommentFrequencyOk" /&gt; Frequency
      &lt;/label&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The script:</p>
  
  <pre><code>$('#CommentFrequencyOk').checked(function () {
      $('#test').setAttribute('disabled');
  });
  </code></pre>