Join our email list for exclusive offers and the latest news.
Choosing a selection results in a full page refresh.
Opens in a new window.
// Wait for the document to be fully loaded
document.addEventListener('DOMContentLoaded', function () {
// Select all the color swatch radio buttons
const swatchInputs = document.querySelectorAll('.swatch-input__input');
// Loop through each swatch input and add an event listener
swatchInputs.forEach(input => {
input.addEventListener('change', function (event) {
// Get the selected color value
const selectedColor = event.target.value;
// Find the span element where the selected color name is displayed
const colorLabel = document.querySelector('.form__label span[data-selected-value]');
// Update the displayed color name with the selected color
colorLabel.textContent = selectedColor;
// Optionally, you can add more actions here, like updating product images
// or price based on the selected variant.
});
});
});