Jquery display multiple images in div from select/option field in form
<p>I need some help finding a jQuery solution to display multiple images in a preview DIV from a select list of images in a form.</p>

<p>Example:</p>

<pre><code>&lt;select name="collection[]" id="collection" multiple="multiple"&gt;
   &lt;option value=""&gt; - Select Image - &lt;/option&gt;
   &lt;option value="image1.jpg"&gt;image1.jpg&lt;/option&gt;
   &lt;option value="image2.jpg"&gt;image2.jpg&lt;/option&gt;
   &lt;option value="image3.jpg"&gt;image3.jpg&lt;/option&gt;
&lt;/select&gt;

&lt;div id="imagePreview"&gt;
Display image here, preferrably in a table/group. When the user deselects from the list the image disappears from this div.
&lt;/div&gt;
</code></pre>

<p>I have seen this jquery script in an answer before (below), but it does not work with multiples. </p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
    $("#collection").change(function() {
        var src = $(this).val();

        $("#imagePreview").html(src ? "&lt;img src='" + src + "'&gt;" : "");
    });
});
&lt;/script&gt;
</code></pre>

<p>Any help greatly appreciated! Thanks.</p>
