Open
Description
I struggle to figure out how to select all elements between two elements such as:
<ul class="pagination">
<li class="prevnext"><a href="#" onclick="return false;" class="disablelink"><</a></li>
<li class="current"><a href="/pc-game-pass/games">1</a></li>
<li><a href="/pc-game-pass/games?page=2" rel="nofollow">2</a></li>
<li class="h-ellip"><span>...</span></li>
<li><a href="/pc-game-pass/games?page=3" rel="nofollow">3</a></li>
<li class="l"><a href="/pc-game-pass/games?page=4" rel="nofollow">4</a></li>
<li class="prevnext"><a href="/pc-game-pass/games?page=2" rel="nofollow">></a></li>
</ul>
And I want to select all li
elements between the one of class current
and the one of class l
using hickory selectors, so that I get back:
<li><a href="/pc-game-pass/games?page=2" rel="nofollow">2</a></li>
<li class="h-ellip"><span>...</span></li>
<li><a href="/pc-game-pass/games?page=3" rel="nofollow">3</a></li>
How do you do that?
Thank You
Metadata
Assignees
Labels
No labels