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

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -