JSFiddle - React, Tailwind, and code Playground
HTML
<input type="submit" value="REPLACE INS" onclick="replaceIn()"/>
<div class="post"><em>Post 1: Replace the 'in' with an 'hello'.</em></div><br/>
<div class="post"><em>Post 2: Replace the 'in' with an 'hello'.</em></div><br/>
<div class="post"><em>Post 3: Replace the 'in' with an 'hello'.</em></div><br/>
<div class="post"><em>Post 4: Replace the 'in' with an 'hello'.</em></div><br/>
<div class="post"><em>Post 5: Replace the 'in' with an 'hello'.</em></div><br/>
JavaScript
replaceIn = function(){
$('.post').each(function(){
$('em').html(
$('em').html().replace('in','hello')
);
});
}