JSFiddle - React, Tailwind, and code Playground

by Rich Costello

HTML

<div id="id1">
 <p>
   apple
 </p>
 <p>
   ball
 </p>
 <p>
   cat
 </p>
 <p>
   dog
 </p>
</div>

JavaScript

$("#id1 p:contains('dog')").html("doll")