selecting another dropdown option with jquery
<p>I'm having difficulty selecting another dropdown option by option value="X" .. how can I do this?</p>

<pre><code>&lt;select id="type"&gt;
    &lt;option value="all"&gt;All Types&lt;/option&gt;
    &lt;option value="1"&gt;Comments&lt;/option&gt;
    &lt;option value="2"&gt;Meanings&lt;/option&gt;
    &lt;option value="3"&gt;Thoughts&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>It works if I do the code below, but because I usually put the total amount of types (so Comments 13, Meanings 6, etc) so the numbers are always changing from one form to another.  </p>

<pre><code>$("#type").val('Comments');
</code></pre>

<p>But how do I select it based on value="X" or value="all"</p>
