JSFiddle - React, Tailwind, and code Playground
HTML
<div id="test"><p>shy turtle</p>funky bear<p>proud ostrich</p>
JavaScript
var bear = $("#test").contents().eq(1);
// What happend with my lovely bear?
console.log( $("#test").contents().eq(1).prev().next().text() );