title: Jquery to validate the selection in dropdown list
body: <p>I have following drop down list code, which I am trying to validate for selection. I am getting the length 0 in all cases. How can I check if an option is selected?</p>
  
  <pre><code>&lt;select name="handpick"  size="10" multiple&gt;
  &lt;option value="25248739"&gt;New York
  &lt;option value="25248716"&gt;California
  &lt;/select&gt;
  
  
  
  var handpickselector = $('select[name="handpick"]');
          if ($("handpickselector option:selected").length &lt;= 0){
  
              //show error message
  
              return false;
          }
  </code></pre>