Const
Gets all the following siblings of the each selected element, optionally filtered by a selector.
Optional
If specified filter for siblings.
The next nodes.
$('.apple').nextAll();//=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>]$('.apple').nextAll('.orange');//=> [<li class="orange">Orange</li>] Copy
$('.apple').nextAll();//=> [<li class="orange">Orange</li>, <li class="pear">Pear</li>]$('.apple').nextAll('.orange');//=> [<li class="orange">Orange</li>]
https://api.jquery.com/nextAll/
Gets all the following siblings of the each selected element, optionally filtered by a selector.