jQuery :not()Selector
Examples
Select all <p> elements except the element with class="intro":
$("p:not(.intro)")
Try it Yourself »
Definition and Usage
The :not() selector selects all elements except the specified element.
The most common usage: combined with other selectors to select all elements in a specified combination except the specified element (as in the example above).
Syntax
$(":not(selector)")
| Parameter | Description |
|---|---|
| selector | Required. Specifies the element that should not be selected. This parameter accepts any type of selector. |
Other Extensions
jQuery Selector