title: Select all checkboxes with a text link: Errors
body: <p>I've been trying to make a "select all" checkbox for a form based on the following link, but I keep getting errors. I've searched, but haven't had luck figuring this out. I'm not sure if I have the selectors set correctly. Any help would be hugely appreciated!</p>
  
  <p><a href="https://stackoverflow.com/questions/7278943/select-all-checkboxes-with-a-text-link/7278993#7278993">Select all checkboxes with a text link</a></p>
  
  <p>Form</p>
  
  <pre><code>&lt;li id='field_1_17' class='gfield gfield_html gfield_html_formatted gfield_no_follows_desc' &gt;
      &lt;a href="#' id="checkall"&gt;Select all checkboxes&lt;/a&gt;
  &lt;/li&gt;
  
  &lt;li id='field_1_12' class='gfield' &gt;
      &lt;label class='gfield_label'&gt;Wednesday 1/22&lt;/label&gt;
      &lt;div class='ginput_container'&gt;
          &lt;ul class='gfield_checkbox' id='input_1_12'&gt;
              &lt;li class='gchoice_12_1'&gt;
                  &lt;input name='input_12.1' type='checkbox' value='2:30-2:40 Welcome and introduction' id='choice_12_1' tabindex='11' /&gt;
                  &lt;label for='choice_12_1'&gt;2:30-2:40 Welcome and introduction&lt;/label&gt;&lt;/li&gt;
  </code></pre>
  
  <p>Script Used from other post</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(function () {
          $('#checkall').click(function () {
              var checked = $(this).data('checked');
              $('input_1_12').find(':checkbox').attr('checked', !checked);
              $(this).data('checked', !checked);
          });
      });
  &lt;/script&gt;
  </code></pre>