title: Check all other checkboxes when one is checked
body: <p>I have a form and group of checkboxes in it. (These checkboxes are dynamically created but I dont think it is important for this question). The code that generates them looks like this (part of the form):</p>
  
  <pre><code>&lt;div id="ScrollCB"&gt;
      &lt;input type="checkbox" name="ALL" value="checked" checked="checked"&gt;
      All (if nothing selected, this is default) &lt;br&gt;
      &lt;c:forEach items="${serviceList}" var="service"&gt;
         &lt;input type="checkbox" name="${service}" value="checked"&gt; ${service} &lt;br&gt;
      &lt;/c:forEach&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>What I want to do is control, whether the checkbox labeled "ALL" is checked and if yes - check all other checkboxes (and when unchecked, uncheck them all). </p>
  
  <p>I tried doing this with javascript like this (found some tutorial), but it doesnt work (and Im real newbie in javascript, no wonder):</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    $ui.find('#ScrollCB').find('label[for="ALL"]').prev().bind('click',function(){
    $(this).parent().siblings().find(':checkbox').attr('checked',this.checked).attr('disabled',this.checked);
  }); });
  &lt;/script&gt;
  </code></pre>
  
  <p>Could you tell me some simple approach how to get it work? Thanks a lot!</p>