Gets all the following siblings up to but not including the element matched by the selector, optionally filtered by another selector.
$('.apple').nextUntil('.pear');//=> [<li class="orange">Orange</li>]
The next nodes.
https://api.jquery.com/nextUntil/
Optional
Selector for element to stop at.
If specified filter for siblings.
Gets all the following siblings up to but not including the element matched by the selector, optionally filtered by another selector.
Example
Returns
The next nodes.
See
https://api.jquery.com/nextUntil/