Well, what you should probably do is define classes for your styles then add and remove those as needed, rather than creating another span inside the original span just to change the text color.
That said, what you're doing works, to its probably not a big deal.
Anyway, I think I just misread the question, so ignore me if TME got you the answer you were looking for.