jQuery not () method
Definition and Usage
not () method returns the element does not meet certain conditions.
This method allows you to specify a condition. Ineligible elements from the select returned, eligible elements will be removed.
This method is usually used to remove one or more elements selected from the element combination.
Tip: not () method is filter () method relative.
grammar
参数 | 描述 |
---|---|
criteria | 可选。规定要从被选元素组合中移除的选择器表达式、jQuery 对象、一个或多个元素。 提示:如需规定多个条件,请使用逗号分隔。 |
function( index ) | 可选。为组合中的每个元素规定要运行的函数。如果返回 true,则移除元素,否则元素将被保留。
|
More examples
Returns are not all even-numbered <p> element
Use: even selectors and not () to return a <p> element is not all even-numbered.
Multiple conditions
How to return to class is not "intro" and id is not "outro" all <p> elements.
Use jQuery object
How to Return <div> element within the class is not "intro" all <p> elements via jQuery object.
DOM
How to return the DOM element id is not "intro" all <p> elements.
Using Functions
How to use the function to select that no two <span> element in all <p> elements therein.