0
jquery
How to i get unselected options in dropdown , when user selected the option im gtng like $(“#id option:selected”).val() or .text but i want unselected values for checking dynmaic conditions.. if any one knw kindly share ur answers. Thank you
1 ответ
+ 2
<select id="sel">
options
</select>
$("#sel option:not(:selected)") will return an array of objects containing the not selected ootions.
can do
$.each($("#sel option:not(:selected)"), function() {
// do something with $(this).val()
});