JSFiddle - React, Tailwind, and code Playground
HTML
<select id="inv_currency">
<option value="£">£</option>
<option value="€">€</option>
</select>
<span class="invE_balance currency">
£
<span>0.00</span>
</span>
JavaScript
$('#inv_currency').on('change', function () {
$('.currency').each(function (index, elm) {
var elem = $(elm).contents().filter(function () {
return this.nodeType === 3;
}).get(0);
elem.nodeValue = elem.nodeValue.replace(/(\€|\£)/g, function(x) {
return x == '€' ? '£' : '€';
});
});
});