Reputation: 13400
I have a multiple select and I need just to access the items which are not selected
I tried the following code but it does not work because it returns also the selected items. Any hints how to fix this code?
$('select.myMultippleSelect option:not(selected)');
[
<option value="13">Normal User</option>
,
<option value="14" selected="selected">Euna Baumbach</option>
,
<option value="15">Test</option>
]
Upvotes: 2
Views: 58
Reputation: 176896
check this out its working for me , you forgot to include : before selected in you code , updated code is
$('select.myMultippleSelect option:not(:selected)');
Upvotes: 1
Reputation: 3242
There's a typo, should be a :
before selected
. Does that exist in your code? If it does, there's your problem.
Upvotes: 1