:not()
selectorThe jQuery :not()
selector selects all elements that do not match the given selector.
:not()
selector Syntax$(':not(selector)')
:not()
selector ExamplesFind all input elements that are not checked and hightlights the next sibling span.
<div><input type="checkbox" name="apple"><span>Apple</span></div> <div><input type="checkbox" name="orange" checked="checked"><span>Orange</span></div> <script> $('input:not(:checked) + span').css( 'background-color', 'aqua' ); </script>