Const
Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or cheerio object.
Optional
Selector for element to stop at.
Optional filter for parents.
The parents.
$('.orange').parentsUntil('#food').length;//=> 1 Copy
$('.orange').parentsUntil('#food').length;//=> 1
https://api.jquery.com/parentsUntil/
Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or cheerio object.