dropdown for product variant picker
parent
7d4f43307f
commit
2648b7779a
|
@ -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 %}
|
||||
|
|
Loading…
Reference in New Issue