jQuery: has () selector
Definition and Usage
: Has () Selector Select all elements in one or more elements therein, match the specified selector.
Tip: To select elements comprising a plurality of elements therein, use a comma (see example below).
grammar
$(":has( selector )")
参数 | 描述 |
---|---|
selector | 必需。规定要选取的元素。 该参数接受任何类型的选择器。 |
Try - Example
Selecting a plurality of elements comprising an element including
How to select multiple elements containing elements including.
Select the element does not contain the specified elements, including
The: not selector with the: has selector used together to select the element does not contain the elements including.