title: Checking for preselected option value when page loads
body: <p>I am dynamically setting an option set to a certain value when the page loads. How would I check for that value on the load of the page and then change another divs contents? My best guess is below, but I've had no luck.</p>
  
  <pre><code>$("select[name=mySelections]").onload.function() {
          if ($(this).find("option:selected").val() == 'myvalue') {
              $("#myDiv").html("Test");
          }
  }
  </code></pre>
  
  <p>My Selector </p>
  
  <pre><code>{html_options name="mySelections" options=$myOptions selected=$test-&gt;One}
  </code></pre>
  
  <p>My html</p>
  
  <pre><code>&lt;div id="myDiv"
  {foreach from $whatever to $this}
  &lt;input type="checkbox" name="{$this-&gt;Name}" value="{$this-&gt;value}" /&gt;
  {/foreach
  &lt;/div&gt;
  </code></pre>