JSFiddle - React, Tailwind, and code Playground

update the font family for special characters using jQuery

by Akram kamal

HTML

<h3>
£££ Pounds!
</h3>
<h3>
&amp;&amp;&amp; Amps!
</h3>
<h3>
@@@ Ats!
</h3>

CSS

.font-fix {
    color: green
}

JavaScript

$(function() {
    $('h3').html(function(i, html) {
        return $(this).text().replace(/([£&@]+)/g, '<span class=\'font-fix\'>$1</span>')
    });
})