title: how to get the multiple values of a select box?
body: <p>I have a multiple select box which appears when I click the link 'Share'. Now I want to get the values of the options selected. How do I do that? is it $('#userList').val()?
  And also I have a doubt whether I could wrote the value property of option like this:  ?</p>
  
  <pre><code>   $(document).ready(function(){
      var flag=0;
      $('#share_form').hide();
  
              $('.Share').click(function(){
          if(flag==1){
              $('#share_form').hide('fast');
              flag=0;
          }
          else{
              $('#share_form').show('slow');
          flag=1;
              return false;
          }
  
       });
  
        });//ready
  
      &lt;a href="#" class="Share"&gt;Share&lt;/a&gt;
      &lt;div id="share_form"&gt;
      &lt;p&gt;Select the users with whom you want to share the Form&lt;/p&gt;
  
      &lt;select id="userList" name="userList" multiple&gt;
          &lt;?php foreach($users as $user){  ?&gt;
              &lt;option value="$user['User']['name']"&gt;&lt;?php echo $user['User']['name'];?&gt;&lt;/option&gt;
          &lt;?php }?&gt;
      &lt;/select&gt; 
      &lt;/div&gt;
  </code></pre>