JSFiddle - React, Tailwind, and code Playground
by Town
HTML
<div id="test">
this is a DIV
<span>
This is a span
</span>
</div>
JavaScript
alert($("#test>span").parent().not('span').text())
by Town
<div id="test">
this is a DIV
<span>
This is a span
</span>
</div>
alert($("#test>span").parent().not('span').text())