JSFiddle - React, Tailwind, and code Playground
HTML
<a class="more" href="/e1">Event 1</a> (TEXT 1 <em>MORE TEXT</em>)
<br>
<a class="more" href="/e2">Event 2</a> (TEXT 2)
<br>
<a class="more" href="/e3">Event 3</a> (TEXT 3)
<br>
JavaScript
$.fn.nextTextUntil = function(until) {
var text = '', next;
if (this.length) {
next = this[0].nextSibling;
while (next !== null && until && !$(next).is(until)) {
text += next.nodeValue || next.textContent;
next = next.nextSibling;
}
}
return text;
};
var text = $('.more').eq(0).nextTextUntil('.more');
console.log(text);