Skip to main content
Version: Next

contains

production

Filters for an element containing another element.

Example:

--------------------
| outerEl |
| -------------- |
| | innerEl | |
| -------------- |
| |
--------------------

// Returns outerEl because outerEl contains innerEl
...outerEl().contains().innerEl()
// Returns no element because innerEl contains no outerEl
...innerEl().contains().outerEl()