Tutorialsplane

jQuery parents Method


jQuery “parents() Method ” is used to get all ancestors of the selected element.

Syntax : jQuery parents() method

$(selector).parents(filter);

filter : It is optional, A selector expression used to match(parent) the elements against.

jQuery parents Method Example

jQuery parents() Method Example


Try it »