English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The parentUntil() method returnsselectorandstopbetween all ancestors.
If both parameters are omitted, this method will return all ancestors, similar toparent()Methods are the same.
$.parentsUntil(stop, selectorExpression)
Return all ancestors between SPAN and BODY:
p (Direct Parent) span
Parameter | Description |
---|---|
stop | (Optional) A selector expression, element, or jQuery object to indicate where to stop searching for ancestor elements |
selectorExpression | (Optional) A selector expression, element, or jQuery object to match the element Note:To return multiple ancestors, separate each expression with a comma |