Hi, this should work: $("td:contains('comment')").each(function(){
$(this).text($(this).text().replace(/comment/, "vote")); }); PS. if you want to prevent html entities being stripped out, then use .html() instead: $(this).html($(this).html().replace(/comment/, "vote")); On Jun 5, 6:58 am, squint <[EMAIL PROTECTED]> wrote: > I want to simply replace the word "comment" wherever it is in a > particular > table. > > Here's my jQuery attempt: > > $(document).ready(function(){ > > $("td:contains('comment')").text("vote"); > > }); > > What this does though is replace all of the text in every cell that > has the > word "comment" in it with the word "vote". > > I just want to replace the word "comment" in every cell, not all of > the text > in every cell. > > Is there a way to do this with jQuery? > > I am doing this on a Confluence wiki if that makes any difference.