You can use the text method and pass a function that returns the modified text, using the native String.prototype.replace method to perform the replacement:
Very simple just use this code, it will preserve the HTML, while removing unwrapped text only:
jQuery(function($){
// Replace 'td' with your html tag
$("td").html(function() {
// Replace 'ok' with string you want to change, you can delete 'hello everyone' to remove the text
return $(this).html().replace("ok", "hello everyone");
});
});