Jump to content

Onit

Member
  • Posts

    1
  • Joined

  • Last visited

Onit's Achievements

Level 1

Level 1 (1/20)

0

Reputation

  1. Hey. I'm currently trying to work out how I can customise some text elements inside a store page. The default HTML code is: <div class="product-price"> from <span class="sqs-money-native">216.00</span> every month </div> Now my thinking was to replace "every" with "per" via Store Settings > Advanced > Page Header Code Injection. My desired result should look like: <div class="product-price"> from <span class="sqs-money-native">216.00</span> per month </div> I was trying to inject the following JavaScript code without any result: <script> let str = document.getElementsByClassName("product-price").innerHTML; let res = str.replace("every", "per"); document.getElementsByClassName("product-price").innerHTML = res; </script> Any helping thought is much appreciated :)
×
×
  • 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.