I need to change the color of a specific sub-string in a text. The text looks like this:
SOME TE<br>
XT IS HER<br>
E.
I tired the .replace()
function from jquery, the problem with it is, that, as you can see above, the text is splited with those <br>
's. How can I "ignore" them ?
For example I want to replace the String TEXT
with <span class="color-red">TEXT</span>
Does anyone has an idea on how to solve this problem ?
's between the words – balex Sep 05 '16 at 06:27
or any other tag from the string and then replace with span – Ish Sep 05 '16 at 06:29