JSFiddle - React, Tailwind, and code Playground
by brandonhorst
HTML
<div>here is * that we are * replacing</div>
<div>here is another * that we are replacing</div>
<input id=idBut type=button value="add class to *" />
CSS
.disclaimer {
font-weight: bold;
color: red;
}
JavaScript
$("#idBut").click(function() {
$("body").children().each(function() {
$(this).html($(this).html().replace(/\*/g,"<span class='disclaimer'>*</span>"));
});
});