Thanks to Chetan Sastry I have this Regex code to parse my page for a list of words and add the TM to them.
var wordList = [\"jQuery UI\", \"jQuery\", \"is\"]; v
J-P linked to some good utilities for the job.
With straight jQuery:
$elem .contents() .filter(function() { return this.nodeType == Node.TEXT_NODE; }) .each(function(){ $(this).text($(this).text().replace(regExp, "$&™")); });
(SEE How do I select text nodes with jQuery?)