title: Run script on loading DropDownListFor
body: <p>I have a view with the following line of code:</p>
  
  <pre><code>@Html.DropDownListFor(m =&gt; m.FrequencyTypes, (List&lt;SelectListItem&gt;)ViewBag.FreqTypes, null, new { @onchange = "toggleOptionalDisplay(this.value)", @class = "form-control" })
  </code></pre>
  
  <p>This works great for when the drop down is changed but I can't work out how to run the script when the drop down is first loaded.</p>