jquery select multiple problem
<pre><code>  &lt;select name="garden" multiple="multiple"&gt;
    &lt;option&gt;Flowers&lt;/option&gt;
    &lt;option selected="selected"&gt;Shrubs&lt;/option&gt;

    &lt;option&gt;Trees&lt;/option&gt;
    &lt;option selected="selected"&gt;Bushes&lt;/option&gt;
    &lt;option&gt;Grass&lt;/option&gt;
    &lt;option&gt;Dirt&lt;/option&gt;
  &lt;/select&gt;



 $("select").change(function () {
          var str = "";
          $("select option:selected").each(function () {
                str += $(this).text() + " ";
              });
          alert(str);
        })
</code></pre>

<p>Its supposed to alert the option of the selected options like "Grass Dirt Bushes"</p>

<p>Instead i am getting blank.</p>
