JSFiddle - React, Tailwind, and code Playground
HTML
<div>here is @ that we are @ replacing</div>
<div>here is another @ that we are replacing</div>
<input id=idBut type=button value="replace @ with $" />
JavaScript
$("#idBut").click(function() {
$("body").children().each(function() {
$(this).html($(this).html().split('@').join("$"));
});
});