javascript - How to check if all select boxes has selected option using jquery? -
i have 7 simple select boxes:
<select> <option selected disabled>choose something</option> <option>some text</option> <option>some more text</option> <option>and more , more</option> </select> <select> <option selected disabled>choose something</option> <option>some text</option> <option>some more text</option> <option>and more , more</option> </select> <select> <option selected disabled>choose something</option> <option>some text</option> <option>some more text</option> <option>and more , more</option> </select> <select> <option selected disabled>choose something</option> <option>some text</option> <option>some more text</option> <option>and more , more</option> </select>
how can check if select boxes have selected rather default option?
you can find selected option disabled, if length==0 no default element selected.
if($('option[disabled]:selected').length == 0){ // select boxes have selected rather default option }
Comments
Post a Comment