title: How to load hidden div based on saved radio button selection using jQuery?
body: <p>I have a form that the user can save and return to edit.  I have an area on the form that toggles a div based on the user's answer to a previous question.  If the answer is 'yes', the div should display.  However, if the user returns to the form, and 'yes' is selected, the div remains hidden.</p>
  
  <p>Working example here: <a href="http://jsfiddle.net/BbrwT/" rel="nofollow">http://jsfiddle.net/BbrwT/</a></p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div&gt;
      &lt;label&gt;Select:&lt;/label&gt;
      &lt;input type="radio" name="radio" class="toggle" value="1" checked="checked"&gt;Yes
      &lt;input type="radio" name="radio" class="toggle" value="0"&gt;No
  &lt;/div&gt;
  
  &lt;div id="details"&gt;
     Details
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$(document).ready(function() {
  
      $('#details').hide();
  
      $('.toggle').on('change',function(){
  
          var showOrHide = ($(this).val() == 1) ? true : false;
  
          $(this).parent().next('#details').toggle(showOrHide);
  
      })    
  
  })
  </code></pre>