Access value of listbox assigned through jquery
<p>I am assgining values to the listbox through jquery. After assgining the values on button click event, i am not able to get the items in the list box. It shows empty item list. I am able to get the values through hidden field, but is there any better way around? </p>

<p>Thanks</p>

<p><strong>Update</strong></p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;
$(function() {   
    $("#imgbtnRight,#imgbtnLeft").click(function(event) {
        var id = $(event.target).attr("id");            
        var selectFrom = id == "imgbtnRight" ? "[id*=lbAllStores]" : "[id*=lbIncludedStores]";            
        var moveTo = id == "imgbtnRight" ? "[id*=lbIncludedStores]" : "[id*=lbAllStores]";
        var selectedItems = $(selectFrom + " option:selected").toArray();
        $(moveTo).append(selectedItems);           
    });
});
</code></pre>

<p></p>
