I have some data that can only be sorted in specific ways due to the way it's outputted.
I have a table with such text strings as
MyTextString_MyTextString
MyTextString_MyTextString
MyTextString_MyTextString
To make it more readable, I'm looking to color the text before _
red and the text after _
blue. Is this possible with jquery, or php?
I have tried things such as $('.myElement').find('_').css('color','red);
but don't think that is the right approach.
Is it possible to only do this once, such as if there is another text string it will remain the second color, blue? i.e. Red_Blue_Blue_Blue (Count = 1?)
Example of markup.
<td class="myTextString1">
MyTextString_MyTextString1
<br/>
MyTextString_MyTextString2
<br/>
MyTextString_MyTextString3
</p>