How to select all the option in listbox
<p>I have the following code</p>

<pre><code>&lt;select id="first" size="5" multiple="multiple"&gt;
    &lt;option id="all" value="0"&gt;Select All&lt;/option&gt;
    &lt;option value="1"&gt;Have&lt;/option&gt;
    &lt;option value="2"&gt;a&lt;/option&gt;
    &lt;option value="3"&gt;Great&lt;/option&gt;
    &lt;option value="4"&gt;day&lt;/option&gt;
&lt;/select&gt;
</code></pre>

<p>When click <code>Select all</code> all the options in the list box have to select.Please help me to correct the below code</p>

<pre><code>$("#first").find("option").attr("selected", true);
</code></pre>
