title: Disable input if checkbox checked
body: <p>i want to disable inputs when a checbox is checked.</p>
  
  <p>part of html:</p>
  
  <pre><code> &lt;div class="span1 "&gt;
    &lt;div class="control-group" id="niedziela"&gt;
      &lt;label class="control-label" for=""&gt;Niedziela&lt;/label&gt;
      &lt;div class="controls"&gt;
        &lt;input type="text" value="&lt;?= $metavalue-&gt;nightlife_open_7_start ?&gt;" name="meta[nightlife_open_7_start]" id="nightlife_open_7_start" class="m-wrap span12 timepicker-24" placeholder=""&gt;
        &lt;input type="text" value="&lt;?= $metavalue-&gt;nightlife_open_7_end ?&gt;" name="meta[nightlife_open_7_end]" id="nightlife_open_7_end" class="m-wrap span12 timepicker-24" placeholder=""&gt;
        &lt;input id="klient_open_4_end" type="checkbox" &lt;?=_ set_checked($metavalue-&gt;nightlife_open_7_end,'do ostatniego klienta') ?&gt; value="do ostatniego klienta" name="meta[nightlife_open_7_end]" class="m-wrap span12 timepicker" placeholder=""&gt; Do ost. klienta
        &lt;input id="zamkniete_open_4_end" type="checkbox" &lt;?=_ set_checked($metavalue-&gt;nightlife_open_7_start,'zamkniete') ?&gt; value="zamkniete" name="meta[nightlife_open_7_start]" class="m-wrap span12 timepicker" placeholder=""&gt; Zamknięte
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>what i want is that if checkbox with id klient_open_4_end is checked it should disable input with id="nightlife_open_7_end"</p>
  
  <p>if checkbox with id="zamkniete_open_4_end" is checked should disable both inputs text areas</p>
  
  <p>i tried with :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $(document).ready(function($) {
      $('#klient_open_4_end').change(function() {
        $(this).find("#nightlife_open_7_start").attr("disabled", true);
      });
    });
  &lt;/script&gt;
  </code></pre>