JSFiddle - React, Tailwind, and code Playground
HTML
<div class="dt_lft">Here is an error</div>
JavaScript
$("div.dt_lft:contains('error')").text(function(i,text){
return text.replace('error', 'success');
});
<div class="dt_lft">Here is an error</div>
$("div.dt_lft:contains('error')").text(function(i,text){
return text.replace('error', 'success');
});