Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% comment %}
- See https://docs.shopify.com/themes/customization/products/how-to-add-a-pick-an-option-to-drop-downs
- {% endcomment %}
- <script>
- $(document).ready(function() {
- if( typeof(productOptions ) != "undefined" ){
- for(i=0;i<productOptions.length;i++) {
- $('.single-option-selector:eq('+ i +')')
- .filter(function() {
- return $(this).find('option').length > 1
- })
- .prepend('<option value="">Pick a ' + productOptions[i][i] + '</option>')
- .val('')
- .trigger('change');
- }
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement