SyntaxFix
Write A Post
Hire A Developer
Questions
The Maximally Standards Compliant way to do it is to create a text node containing the text you want and append it to the span (removing any currently extant text nodes).
The way I would actually do it is to use jQuery's .text().
.text()