I have a bunch of configurable products with just one attribute each.
I need to select the first product in the super-attribute-select <select> box (e.g. the second <option>).
This code works from the console...
jQuery('select.super-attribute-select option:nth-of-type(2)').prop('selected', 'selected');
jQuery('select.super-attribute-select').change();
...but not from document.ready, as the <select> box is only populated after the page loads.
Does anyone know the proper technique for doing this?