title: Looping through selected values in multiple select combobox JQuery
body: <p>I have the following scenario. </p>
  
  <p>I have a combobox where multiple selection is available.</p>
  
  <pre><code>                &lt;select id="a" multiple="multiple"&gt;
                      &lt;option value=""&gt;aaaa&lt;/option&gt;
                      &lt;option value=""&gt;bbbb&lt;/option&gt;
                      &lt;option value=""&gt;cccc&lt;/option&gt;
                      &lt;option value=""&gt;dddd&lt;/option&gt;
                  &lt;/select&gt;
  </code></pre>
  
  <p>Now I also have a button</p>
  
  <pre><code>&lt;button type="button" id="display"&gt;Display&lt;/button&gt;
  </code></pre>
  
  <p>When a user clicks on this button, it should list all the selected values of the dropdown in an alert box</p>
  
  <p>My JS code looks as follows</p>
  
  <pre><code>  $(document).ready(function() {
                  $('#display').click(function(){
                      alert($('#a').val());
                  });
  
  
          });
  </code></pre>
  
  <p>Any pointers will be appreciated</p>