jQuery :not()セレクター
例
class = "intro"の要素を除くすべての<p>要素を選択します。
$("p:not(.intro)")
定義と使用法
:not()セレクターは、指定された要素を除くすべての要素を選択します。
これは主に、グループ内の指定された要素を除くすべてを選択するために別のセレクターと一緒に使用されます(上記の例のように)。
構文
$(":not(selector)")
Parameter | Description |
---|---|
selector | Required. Specifies the element to not select. This parameter accepts any kind of selector |