JSFiddle - React, Tailwind, and code Playground
HTML
<table><tbody><tr>
<td class="cartItemTotal">
<span>
<span class="currency_sign">£</span>
25.00
</span>
</td>
</tr>
</tbody></table>
JavaScript
var node = $(".cartItemTotal>span").contents().filter(function() {
return this.nodeType == 3;
});
node.last().replaceWith( document.createTextNode( "1.99" ));