jQuery :has() Selector
jQuery :has() Selector
The :has() selector is used to select all elements that have one or more elements inside of them and it matches the specified selector. For selecting multiple elements inside a single element, we just need to separate them with a comma.
Syntax:-
Its syntax is:- $(":has(selector)");
Further Explanation:-
Parameter | Description |
---|---|
selector | Required. Specifies the element to select. |