I have a selection of options by images: http://www.raues.com/products/copy-of-black-and-blue-glasses-top (http://www.raues.com/products/copy-of-black-and-blue-glasses-top)
I want to count the number of images in each option and change the style (width) of the images according to that number. I found this code that can count the size of the select input:
So I did the following:
But it does not work. I think liquid does not read the "len" variable that I created before and I am not sure if it is the proper way to add the style to the code if statement is true.
Thank you very much for your help.
len variable does not exist at the time the liquid if statement
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.