JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<p><strong>Title 1</strong></p>
<p>Content 1</p>
<p>Content 2</p>
<p><strong>Title 2</strong></p>
<p>Content 1</p>
<p>Content 2</p>
<p>Content 3</p>
</div>
JavaScript
$(document).ready(function() {
$("p").hide();
$("p:contains('Title 2')").nextAll().show();
});