JSFiddle - React, Tailwind, and code Playground
HTML
<div>here is mohit that we are mohit replacing</div>
<div>here is another mohit 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().replace(/@/g,"$"));
});
});