Choose selectbox option by javascript by text
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3541565/selecting-an-option-by-its-text">Selecting an option by its text</a>  </p>
</blockquote>



<p>Is there any way how to choose the option in selectbox <strong>by the text label</strong> of the option (<strong>not the value</strong>)?</p>

<pre><code>&lt;select id="form-mySelect" name="number"&gt;
    &lt;option value="0"&gt;Zero&lt;/option&gt;
    &lt;option value="1"&gt;One&lt;/option&gt;
    &lt;option value="2"&gt;Two&lt;/option&gt;
&lt;/select&gt;


$("#form-mySelect").val("One");
</code></pre>

<p>The example above doesn't work in jQuery 1.4.3. I've read somewhere, that in some lower version of jQuery selecting option by >text label&lt; (<strong>not by the value</strong>) works.</p>

<p>Is there any way, how to simulate this behavior and make it functional in jQuery 1.4.3?</p>
