JSFiddle - React, Tailwind, and code Playground

by Tiago Sousa

HTML

<p>this is the phrase to replace</p>
<p>the phrase to replace</p>
<p>Lorem Ipsum</p>

JavaScript

var thePhrase = "this is the phrase to replace";
var toReplace = "this is the phrase that replaces thePhrase";
$("p").each(function(){
   var $this = $(this);
    if( $this.html() == thePhrase) {
        $this.html( toReplace );
    }
});