Change text in website with new text using jquery

Use the three methods to set content:

  • text() – Sets or returns the text content of selected elements
  • html() – Sets or returns the content of selected elements (including HTML markup)
  • val() – Sets or returns the value of form fields
var elementt = document.querySelectorAll('.order-wizard-cart-summary-total p')[0].innerText
var valuest = elementt.split("\n");
var pricet = valuest[0]
jQuery('.order-wizard-cart-summary-total p').html('<span class="order-wizard-cart-summary-grid-right">'+pricet+'</span> Total');

Leave a comment

Your email address will not be published. Required fields are marked *