JSFiddle - React, Tailwind, and code Playground
HTML
<div>
<em class="button" id="old">old button</em>
</div>
CSS
.button {
display:inline-block;
padding: 10px;
cursor: pointer;
}
#old { background-color: yellow; }
#new { background-color: orange; }
JavaScript
var oldButton = '<em class="button" id="old">old button</em>'
var newButton = '<em class="button" id="new">new button</em>'
$('#old').click(function(){
$('div').html(newButton);
});
$('#new').click(function(){
$('div').html(oldButton);
});