Remove "Select" from Product Variant Dropdown in Squarespace
Do you have variable products in your Squarespace store but don’t want the dropdowns to have the word “Select” in them? Here’s how to remove it.
Before
After
The JavaScript
Copy and paste the following code into your shop’s header. Go to the PAGES menu. Hover over your shop page on the left and click the GEAR icon that comes up. Click on ADVANCED → PAGE HEADER CODE INJECTION and paste the code there.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(window).on('load', function() { $("select").each(function() { var variabletext = $(this).attr("aria-label"); variabletext = variabletext.replace("Select ", ""); $(this).attr("aria-label",variabletext); $(this).find("option:first-child").val(variabletext); $(this).parent().attr("data-text",variabletext); }) }); </script>