English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The :not() selector selects elements that do not match the givenSelectorAll unmatched elements.
It is usually used with another selector to select all contents except the specified element in the group.
$ (":not(selector)")
Select all <p> elements except those with class="demo":
$ (document).ready(function () { $("p:not(.demo)").css("background", "yellow"); });Test See‹/›
Parameter | Description |
---|---|
selector | Selector for Filtering |