dropdown for product variant picker

main
alexanderroese 2024-07-13 23:20:15 +02:00
parent 7d4f43307f
commit 2648b7779a
1 changed files with 3 additions and 3 deletions

View File

@ -207,17 +207,17 @@
// Set the initial value when the page loads
window.addEventListener('load', function() {
const selectedValue = selectElement.value;
customSelectedValue.innerText = selectedValue;
// customSelectedValue.innerText = selectedValue;
console.log("load", selectedValue)
/*
document.querySelectorAll('.shx-custom-dropdown-content div').forEach(div => {
if (div.getAttribute('data-value') === selectedValue) {
div.classList.add('shx-custom-selected-variant');
} else {
div.classList.remove('shx-custom-selected-variant');
}
});
}); */
});
</script>
{% else %}