title: How to autoselect option depending on input's value
body: <p>I need select's option to be actually selected on document ready depending on an input's value.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;select id="mySelect"&gt;
  &lt;option value="1"&gt;myVal1&lt;/option&gt;
  &lt;option value="2"&gt;myVal2&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;input type="text" id="myId" value="2"&gt;
  </code></pre>
  
  <p>For example, we've got a predefined value '2' of the input on page load. I need select-box to be auto-selected with it's option having the same value as input 'myId'. I mean 'mayVal1' must be selected.</p>
  
  <p>When input has no value select must behave as default.</p>
  
  <p>Thanks!</p>