how to find the selected value and text of multiple select boxes and add them to hidden fields
<p>I've been stuck with this problem for sometime now, I just don't seem to find a way to fix it.I'd really appreciate it if someone could help me.</p>

<p>I have multiple select boxes on 1 page, I need to get the text of the select boxes(which is the qty of an item) and the value of the selectboxes (the price of the item) and the item description which is in a span tag with a class descriptionColor, </p>

<p>and when someone chooses something from the first select box and sth from the second and so on,I need to add the item name, quantity and total price of each item to hidden fields.</p>

<p>so the hidden field would include:
for name:qty of item 1 + item1 name,qty of item2 + item2 name ...
for price:total price of all items.</p>

<pre><code> &lt;td&gt;&lt;span class="descriptions"&gt;&lt;span class="descriptionsColor"&gt;MIXED SALAD&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;td&gt;&amp;nbsp;&lt;/td&gt;
        &lt;td class="body"&gt;

        &lt;select class="select" name="select3" id="select3"&gt;
          &lt;option value="0"&gt;0&lt;/option&gt;
          &lt;option value="1.99"&gt;1&lt;/option&gt;
          &lt;option value="1.99"&gt;2&lt;/option&gt;
          &lt;option value="1.99"&gt;3&lt;/option&gt;
          &lt;option value="1.99"&gt;4&lt;/option&gt;
          &lt;option value="1.99"&gt;5&lt;/option&gt;
          &lt;option value="1.99"&gt;6&lt;/option&gt;
          &lt;option value="1.99"&gt;7&lt;/option&gt;
          &lt;option value="1.99"&gt;8&lt;/option&gt;
        &lt;/select&gt;

        &lt;/td&gt;

     &lt;td&gt;&lt;span class="descriptions"&gt;&lt;span class="descriptionsColor"&gt;ONION RINGS&lt;/span&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;td class="body"&gt;10 Pieces&lt;/td&gt;
        &lt;td&gt;&lt;span class="body"&gt;
          &lt;select  class="select" name="select" id="select"&gt;
            &lt;option value="0"&gt;0&lt;/option&gt;
            &lt;option value="1.99"&gt;1&lt;/option&gt;
            &lt;option value="1.99"&gt;2&lt;/option&gt;
            &lt;option value="1.99"&gt;3&lt;/option&gt;
            &lt;option value="1.99"&gt;4&lt;/option&gt;
            &lt;option value="1.99"&gt;5&lt;/option&gt;
            &lt;option value="1.99"&gt;6&lt;/option&gt;
            &lt;option value="1.99"&gt;7&lt;/option&gt;
            &lt;option value="1.99"&gt;8&lt;/option&gt;
          &lt;/select&gt;
        &lt;/span&gt;&lt;/td&gt;
          ..
          ..

$(function () {
   $('#my-add-button-sides').click(function() {

 var qty = [];
 var price = [];
 var items = [];
 $('.select').children('option :selected').each(function() {
  var $this = $(this);
  qty.push($this.text() );
  price.push($this.val() );
  items.push( ($(this).prevAll(".descriptionsColor").text()) );
 });

 var randomNumber = Math.floor((Math.random() * 9000)+200);
 $('input[name=my-item-id]').val(randomNumber);
 $('input[name=my-item-name]').val(items);
 $('input[name=my-item-price]').val(price * qty);


 });
});
</code></pre>
