Content Filters

Content filters get the content of each element in the set of matched elements, optionally filtered by a selector. Following are the methods of content filters.


The .contains() method is used to check the document if it contains the required content.

Empty: .empty()

The empty() method is used to remove the contents from the selected elements. This method removes the child nodes as well as the text that are within the selected elements but does not remove the atributes or element by itself.


The :has() selector is used to identify the specified content in the form.

Parent: :parent()

The :parent() selector is used to select the specific parent elements in the form.

Ask Questions

Ask Question