JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/dot-luv/jquery-ui.css">
  <div>
    <span>John,</span>
    <span>Karl,</span>
    <span>Brandon</span>

   </div>
   <div>
    <span>Glen,</span>
    <span>Tane,</span>
    <span>Ralph</span>
  </div>

JavaScript

$("div span:first-child").each(function() {
    alert("This is child #" + $(this).index() + " in this section: " + $(this).text());
});