Possible Duplicate:
Check if option is selected with jQuery, if not select a default
I have html like this:
<div id="somedivid">
<select class="someclass">
<!-- options -->
</select>
<select class="someclass">
<!-- options -->
</select>
</div>
How to check if options is selected in both select boxes?
EDIT: i cant change html, so it means i cant add ids to select elements.
A select always has a selection.
But supposing you put an empty choice like this :
You can test this :
EDIT : if you don’t have ids or names, you may use this :