title: jQuery Set Select Index
body: <p>I have an select box:</p>
  
  <pre><code>&lt;select id="selectBox"&gt;
    &lt;option value="0"&gt;Number 0&lt;/option&gt;
    &lt;option value="1"&gt;Number 1&lt;/option&gt;
    &lt;option value="2"&gt;Number 2&lt;/option&gt;
    &lt;option value="3"&gt;Number 3&lt;/option&gt;
    &lt;option value="4"&gt;Number 4&lt;/option&gt;
    &lt;option value="5"&gt;Number 5&lt;/option&gt;
    &lt;option value="6"&gt;Number 6&lt;/option&gt;
    &lt;option value="7"&gt;Number 7&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I'd like to set one of the options as "selected" based on it's selected index.</p>
  
  <p>For example, if I am trying to set "Number 3", I'm trying this:</p>
  
  <pre><code>$('#selectBox')[3].attr('selected', 'selected');
  </code></pre>
  
  <p>But this doesn't work.  How can I set an option as selected based on it's index using jQuery?</p>
  
  <p>Thanks!</p>