title: get text of item by values multiple select using jquery/javascript
body: <p>I need to get text of item by values in multiple select box.
  I have tried this code but it give me overall selected text with no separation or spacing.</p>
  
  <pre><code>if ($("#&lt;%=ddlSubject.ClientID %&gt;").val()) {
      var values = $("#&lt;%=ddlSubject.ClientID %&gt;").val();
      if (values.indexOf(',') != -1) {
          values = $(values).split(',');
      }
      var texts = $("#&lt;%=ddlSubject.ClientID %&gt; :selected").text();
      alert(texts);
      if (texts.indexOf(',') != -1) {
          texts = $(texts).split(',');
      }
  }
  });
  </code></pre>
  
  <p>This is my rendered html select list</p>
  
  <pre><code>&lt;select size="4" name="ctl00$ContentPlaceHolder1$ddlSubject" multiple="multiple" id="ctl00_ContentPlaceHolder1_ddlSubject" class="chosen-select" style="height: 250px; width: 250px; display: none;"&gt;
      &lt;option value="Account - I" style="font-style:italic;" disabled="disabled"&gt;Account - I&lt;/option&gt;
      &lt;option value="1"&gt;Chap1&lt;/option&gt;
      &lt;option value="2"&gt;Chap2&lt;/option&gt;
      &lt;option value="3"&gt;Chap3&lt;/option&gt;
      &lt;option value="4"&gt;Chap4&lt;/option&gt;
      &lt;option value="Joint Venture" style="font-style:italic;" disabled="disabled"&gt;Joint Venture&lt;/option&gt;
      &lt;option value="5"&gt;Chap1&lt;/option&gt;
      &lt;option value="6"&gt;Chap2&lt;/option&gt;
      &lt;option value="7"&gt;Chap3&lt;/option&gt;
      &lt;option value="8"&gt;Chap4&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Above code give me text like this <code>"chap1chap2chap3"</code> if these item are selected.
  I want some text separation using ',' or any thing else. How can I get the selected text?</p>