title: Within a multi select, I need to be able to get the value of the currently selected option
body: <p>Edit:I think I have confused you guys with what I need. If I select val1 I need the function to return val1. If I then select val2, with val1 still selected as part of the multi select, I need to return val2. Then I can use the values to set the id and name of rewly created inputs.</p>
  
  <p>I have a select list that has multiple="multiple" </p>
  
  <p>I want to create a text input associated with each selected option and set the id and name of the new input based on the value of each newly selected option, but I always get the value of the first item from the onchange event. Not the first value, but the first selected value. So if I choose val2 first, that is returned, but if I choose val1 first then val2 the id and name will be the same as when val1 is selected.</p>
  
  <pre><code> &lt;select id="multiSelect" multiple="multiple"&gt;
    &lt;option value="val1"&gt;Value 1&lt;/option&gt;      
    &lt;option value="val2"&gt;Value 2&lt;/option&gt;
    &lt;option value="val3"&gt;Value 3&lt;/option&gt;
   &lt;/select&gt;
  </code></pre>
  
  <p>I have used the following function and it returns the first value.</p>
  
  <pre><code> $("#multiSelect").on('change', function(evt, params) {
     alert($("option:selected", this).val());
  
   });
  </code></pre>
  
  <p>This will return the first selected option. If I then choose the second option, I still get the first value.  I need to get the value of whichever option has been selected.</p>
  
  <p>Thanks in advance.</p>