scroll to selected item in html listbox
<p>I have an html listbox :</p>

<pre><code>&lt;select id="test" size="5"&gt;           
&lt;option value="1"&gt;1&lt;/option&gt;
&lt;option value="2"&gt;2&lt;/option&gt;
&lt;option value="3"&gt;3&lt;/option&gt;
&lt;option value="4"&gt;4&lt;/option&gt;
&lt;option value="5"&gt;5&lt;/option&gt;
&lt;option value="6"&gt;6&lt;/option&gt;
&lt;option value="7"&gt;7&lt;/option&gt;
&lt;option value="8"&gt;8&lt;/option&gt;
&lt;option value="9"&gt;9&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>I am trying to select an item via code and have the listbox automatically scroll to the selected item.</p>

<p>Is this supposed to scroll the listbox automatically to the selected item ?</p>

<pre><code>$('#test option[value="8"]').attr('selected', 'selected');
</code></pre>

<p>I can't seem to get it to do that ... am I missing something ?</p>
