title: Make a dropdown visible on check box click in mvc5
body: <p>I have a check box. On this checkbox's click i want to make a drop down visible. the code is as follows</p>
  
  <pre><code>&lt;div&gt;
          &lt;input type="checkbox" name="SchoolAdmin" value="True" id="schooladmin"&gt;I would like to register as a school admin&lt;br&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
          @Html.DropDownList("school", new List&lt;SelectListItem&gt;
          {
              new SelectListItem{ Text="Please select", Value = "-1" },
              new SelectListItem{ Text="School1", Value = "1" },
              new SelectListItem{ Text="School2", Value = "0" }
          })
      &lt;/div&gt;
  </code></pre>
  
  <p>and the script for the above is as follows</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      if ($('.schooladmin').is(":checked")) {
          //show the hidden div
          $('#school').show("fast");
      } else {
          //otherwise, hide it
          $('#school').hide("fast");
      }
      $('.schooladmin').click(function () {
          // If checked
          if ($('.schooladmin').is(":checked")) {
              //show the hidden div
              $('#school').show("fast");
          } else {
              //otherwise, hide it and reset value
              $('#school').hide("fast");
              $('#school').val('');
          }
      });
  });
  </code></pre>
  
  <p></p>
  
  <p>Anybody there to help me out pls...</p>