Select All Next Siblings Until selector .nextUntil([selector], [filter])

.nextUntil([selector], [filter])

selector & filter are optional
e.g. $("span").nextUntil()

.nextUntil([selector], [filter]) will select all next siblings up to but not included the one matching selector, if filter is provided then next siblings should match filter too.

If no arugments are provided i.e. (selector & filter), then .nextUntil() is equivalent to .nextAll()
Example 1: $("span").nextUntil("div") will find all next siblings of each <span> up to but not included the first <div> sibling.
<div>A</div>
<span>B</span>
<b>C</b>
<p>D</p>
<div>E</div>  // until first <div> 
<div>F</div>
Example 2: $("span").nextUntil("div", "p") will find all next siblings of type <p> for each <span> up to but not included the first <div> sibling.
<div>A</div>
<span>B</span>
<b>C</b>
<p>D</p>  // of type <p> 
<div>E</div>  // until first <div> 
<div>F</div>
jQuery traversing tree .nextUntil([selector], [filter])