Select Ancestors Until selector .parentsUntil()

.parentsUntil([selector], [filter])

selector & filter are optional
e.g. $("b").parentsUntil("div")

.parentsUntil(selector, filter) will find ancestors matching optional filter up to but not including ancestor matching selector.

Example 1: $("b").parentsUntil("div") will find ancestors of <b> up to but not including <div> ancestor.
<div>  // until here 
  <p>
    <span>
      <b>a</b>
    </span>
  </p>
</div>
Example 2: $("b").parentsUntil( $("#someID")) will find ancestors of <b> up to but not including ancestor element with id='someID'.
<div>
  <div id="someID"> // until here 
    <span>
      <b>a</b>
    </span>
  </div>
</div>
Example 3: $("b").parentsUntil("div", ".className") will find ancestors of <b> matching filter "className" up to but not including ancestor of type <div>.
<div>  // until here 
   <p>  // not matching filter i.e. NO class=className 
     <span class="className">
       <b>a</b>
     </span>
  </p>
</div>
jQuery traversing tree .parentsUntil()