JSFiddle - React, Tailwind, and code Playground

HTML

<div id="myDIV">
 <div id="one">
  <span>
    <a href="#">Seek me!</a>
  </span>
 </div>
</div>

JavaScript

alert($("#myDIV :not(:has(*))").text());