html - javascript to replace element value with empty space -
i looking replace tspan contains $ symbol empty tspan space. there way replace in entire project on load of page?
assuming original version of question meant (to display html, need enclose them in quotes, e.g. <tspan>
):
to replace every <tspan class="symbol">$</tspan>
<tspan> </tspan>
, 1 way it:
$( $('tspan.symbol').each(function() { if ($(this).text() == '$') { $(this).removeclass('symbol'); $(this).text(' '); } }); );
Comments
Post a Comment