I am using this method to find and replace a piece of text and not sure why it is not working? When I use console.log, I can see the correct content I want to replace but the end result is not working:
(function($) {
$(document).ready( function() {
var theContent = $(".transaction-results p").last();
console.log(theContent.html());
theContent.html().replace(/Total:/, 'Total without shipping:');
});
})(jQuery);
Any thoughts?
Thank you!
theContent.html(theContent.html().replace(/Total:/, 'Total without shipping:'));