Rich-text Reply

Altering text on ALL buttons on a single page

Randy_Osborn 06-24-14

Altering text on ALL buttons on a single page

[ Edited ]

We have a mobile version of our website that has a very long list of products, or "Looks", that get updated every day. I want to test the wording "SHOP THIS LOOK" vs "BUY THIS LOOK" for each Look listed. I see how to alter the button text individually, but is there a simple way to update all of the buttons on a single page? And will that apply to new products being loaded in daily?


For an example of what I'm talking about, load this URL on a mobile device:

OR go to and navigate to the New Looks page from the side menu.


Thank you


AdamA 06-24-14

Re: Altering text on ALL buttons on a single page

Hi Randy,

Have you seen this article in our Knowledge Base?

Or this video?

They walk you through how to change multiple similar elements at once. Basically, you'll be doing some light work in the Code Editor to find the part of the selector that's more generic and separate it from the part that's more specific. Once you get rid of the more specific part, then the changes you made will apply to all similar elements. Please let me know if that doesn't work for you!

As for the fact that the images are populated dynamically, it looks like you have generic names for the containers that hold the images -- product-list-product and product-image-container. If you make a change to one of those in the Editor, then I'd think that the changes would continue to apply even if new products are loaded in because the containers are more generic.

Again, please let me know how that works for you. I'd recommend doing some QA on this one by setting up a test cookie so you can make sure that everything displays as you intend:

Thanks, and hope this helps!
Amanda 06-26-14

Re: Altering text on ALL buttons on a single page

[ Edited ]

Hey @Randy_Osborn 


The link @AdamA provided is super helpful. To make things easy, I've provided a line of jQuery that will do the trick for your page


You'll just need to click the "Edit Code" button in the editor and past the below snippet.  Essentially the line of code is grabbing all of the buttons with the class "button" and "class" that exist within the container "product-info" and then changing the text to "Shop this look"


This will apply to *all* of the buttons that meet the description above and will also apply to the new products you add in daily so long as they all have same classnames. 


Let me know if you have any questions! 


$(".product-info .button.large").text("Shop this look");

 Screen Shot 2014-06-25 at 5.03.38 PM.png


Re: Altering text on ALL buttons on a single page

Thanks, AdamA and Amanda for the quick responses! These were both very helpful.