.sibling{Element,Node}s method for Elements
emanresusername opened this issue · comments
Jordan Gwyn commented
this came up just now, not hard to work around, but getting siblings would be nice
<div>
<a href="/page-1">1</a>
<a href="/second-page">2</a>
<a href="/3rd-pg">3</a>
<a id=nextButton href="/3rd-pg">Next</a>
</div>
(doc >> element("#nextButton")).siblings.foreach(sibling => {
// #nextButton wouldn't show up as a sibling here like it would in `.parent.get.children`
val href = sibling.attr("href")
// grab stuff from each page
})
Rui Gonçalves commented
Closed with #32. Thank you once again!