JSFiddle - React, Tailwind, and code Playground

by George Batt

HTML

<div class="breadcrumbs">
    <a href="#">Root element</a>
    <a href="#">Blog</a>
    Page 2
</div>

CSS

.paginationSection {
    background-color: yellow;
}

JavaScript

$('.breadcrumbs').contents().filter(function(){
    return this.nodeType === 3 && $.trim(this.nodeValue);
}).wrap('<span class="paginationSection"></span>');