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?
<select name="handpick" size="10" multiple>
<option value="25248739">New York
<option value="25248716">California
</select>
var handpickselector = $('select[name="handpick"]');
if ($("handpickselector option:selected").length <= 0){
//show error message
return false;
}