I need to select all <option> tags (.just_added select option) that aren’t selected with jQuery.
This is what I got so far…
$('.just_added select option:selected');
The problem is that it selects all <option> tags that are selected, but I need to select all <option> tags that aren’t selected.
Any ideas? Thanks in advice!
You can use
:not[docs]:Or without jQuery pseudo selectors (using the
.not()[docs] method):