Display dynamic option value in footer Jquery script
Hi all, I really hope you can help me!
I'm using a wordpress plugin to show swatch colours on product variations in a woocommerce store.
Currently the colour code only shows when you hover over the swatch in a little tooltip. I've added a script to the footer that is supposed to show the code next to the swatch as well :
jQuery('.woo-variation-swatches-stylesheet-enabled.woo-variation-swatches-style-squared .variable-item').append('<h6>R1044</h6>');
Obviously the actual number is now hardcoded into an h6 tag, but how do get it to display the option value for each swatch?
<option value="r0167" class="attached enabled">R0167</option>
Thanks