title: jQuery - Make Div Visible When Checkbox is Clicked, On PageLoad (If already checked)
body: <p>I need to make a div visible when a checkbox is clicked using jQuery/Java. The "checked" is coming from the database, so I also need to a check to see if the checkbox is already checked on page load.</p>
  
  <p>This is what I have currently: </p>
  
  <pre><code>&lt;input type="checkbox" name="foo" value="1" onclick="$(this).is(':checked') &amp;&amp; $('#checked-a').slideDown('slow') || $('#checked-a').slideUp('slow');"/&gt;
  
  &lt;div class="dis-sub" style="display: none;" id="checked-a"&gt;
      ...
  &lt;/div&gt;
  </code></pre>
  
  <p>The code works as-is to show/hide a div. I need a solution that checks on page load to see if the checkbox is already checked (dynamically in this case, by PHP from a database).</p>
  
  <p>Thanks in advance.</p>