JSFiddle - React, Tailwind, and code Playground
HTML
<b id="foo">Some bold text</b> and a text node
JavaScript
window.jQuery('#foo').each(function (i) {
var nextNode = this.nextSibling;
if (nextNode && nextNode.nodeType == 3) {
alert("Next sibling is a text node with text '" + nextNode.data + "'");
}
});