Javascript? Changing text objects on a page?

rsirotarsirota Member Posts: 93

I wanted to change all of the text on the checkout page from "Ship" and "Shipping" to be "Delivery". I know that the page is protected. However, is there a way using the javascript to change this text on the page? I tried adding the following code to my js in settings:

<script>

(function () {$("#container").contents().each(function () {

  if (this.nodeType === 3) this.nodeValue = $.trim($(this).text()).replace(/Shipping/g, "Delivery")

  if (this.nodeType === 1) $(this).html( $(this).html().replace(/Shipping/g, "Delivery") )

})();

</script>

Tags:

Best Answer

Sign In or Register to comment.