I have the following markup:
<div id="breadcrumbs">
<ul>
<li><span class="crumblink"><a href="/">Home</a></span></li>
<span class="arrows"> »</span>
<li><span class="crumblink"><a href="/locations-brands">Publishing Regions</a></span></li>
<span class="arrows"> »</span>
<li><span class="crumblink"><a href="/locations-brands/publications">Locations & Brands</a></span></li>
<span class="arrows"> »</span>
<li><span class="crumblink"><a href="/locations-brands/publications/popupbrand">Publications</a></span></li>
<span class="arrows"> »</span>
</ul>
</div>
How can I remove a <li> if has string "Publications" as well as its next span.arrows?
li, that can be a child of theulorolelements? Thosespans invalidate your HTML. I'd suggest using the ::after pseudo element instead for that presentational aspect.