Reputation: 137
I have a jquery UI multiselect dropdown. Here is the link I want to get unchecked value. I have something like this for getting all selected options:
var optionValues = $('option:selected', this).map(function() {
return this.value;
}).get();
But I want unchecked value. Any idea?
Upvotes: 0
Views: 656
Reputation: 18873
Try this :-
var notSelectedValues = $("select#id").find('option').not(':selected');
var array = notSelectedValues.map(function () {
return this.value;
}).get();
alert(array.join(', '))
Upvotes: 1