title: checkbox enable onload to display other elements
body: <p>Ok, The question here is to allow a form to grab information from a mysql settings, like enabled or disabled. then a checkbox is going to determine if the the 3 following text fields (box123) are going to be enabled or disabled depending on that request.</p>
  
  <pre><code>&lt;script src="http://code.jquery.com/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  &lt;script src="test.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form&gt;
          &lt;input type="checkbox" name="detailsgiven" id="checker" checked=checked&gt;Enabled?
          &lt;br&gt;
          &lt;input type='text' name="details" id="tb1" value='box1'&gt;
          &lt;br&gt;
          &lt;input type='text' name="details" id="tb2" value='box2'&gt;
          &lt;br&gt;
          &lt;input type='text' name="details" id="tb3" value='box3'&gt;
          &lt;br&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  
  &lt;/html
  </code></pre>
  
  <p>></p>
  
  <p>test.js Jquery code which allows the check to be enabled or disabled depending on the activation varible</p>
  
  <pre><code>toggleInputs($('#checker'));
  
  $('#checker').click(function () {
      toggleInputs($(this));
  });
  
  function toggleInputs(element) {
      if (element.prop('checked')) {
          $('#tb1').prop('disabled', false);
          $('#tb2').prop('disabled', false);
          $('#tb3').prop('disabled', false);
      } else {
          $('#tb1').prop('disabled', true);
          $('#tb2').prop('disabled', true);
          $('#tb3').prop('disabled', true);
      }
  }
  </code></pre>