title: How to pass multiple values from a list using JQuery
body: <p>I have the following list that gets dynamically built and performs the same function as a select box would do. </p>
  
  <pre><code>&lt;ul class="list-group" name="combobox1" id="combobox1"&gt;
  &lt;li class="list-group-item" value="6" /&gt;Option 1&lt;/li&gt;
  &lt;li class="list-group-item" value="12" /&gt;Option 2&lt;/li&gt;
  &lt;li class="list-group-item" value="15" /&gt;Option 3&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>When an item in the list is selected i user Jquery to append 'active' into the class to make 'list-group-item active'.</p>
  
  <p>A user can select one or more list items from the list and click 'Show Details' which will give them details in a popup. This details popup is traggered by the onclick function in a button. My question is how do I use Jquery to get the values of one or more items in the list that a user has selected to pass via the onclick method?</p>
  
  <pre><code>onclick=showDetails(itemsvalues) 
  </code></pre>
  
  <p>This returns one value, but what if there was more than one item selected?</p>
  
  <pre><code>onclick="showdetails($('#combobox1 li.active').val());
  </code></pre>
  
  <p>Thank you!</p>