Jump to content

make a phrase within a section of code bold

Recommended Posts

I have the following code which is working perfectly:

<script>
  window.addEventListener('DOMContentLoaded', (event) => {
    var products = document.querySelectorAll('.product-price'), sf;
    for (sf=0; sf<products.length; sf++) {
      var price = products[sf];
      if (price.innerText.replace(/[^\d]+/g , "") === '000') {
        price.textContent = 'A Skin Review is Needed Prior to Purchasing Skin Better Science Products'; 
      }
    }
  });
</script>

 

I would like to make it so that the phrase 'A Skin Review is Needed Prior to Purchasing Skin Better Science Products' is bold. I'm not sure where to add in the necessary code into this to make it happen 

(extreme code rookie question - apologies!)

Link to comment
  • Replies 1
  • Views 73
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.