JSFiddle - React, Tailwind, and code Playground

HTML

<div id="mainContent">this is a test text & it has several different & characters in the sentence &</div>

CSS

.otherfont{font-weight:bold;}

JavaScript

var mainContent = $('#mainContent').html();
var newContent = mainContent.replace(/&amp;/g, '<span class="otherfont">&amp;</span>');
$('#mainContent').html(newContent);