dropdown for product variant picker

main
alexanderroese 2024-07-13 19:14:04 +02:00
parent 6b29318eaa
commit 288eb467c2
1 changed files with 3 additions and 3 deletions

View File

@ -205,11 +205,11 @@
// Set the initial value when the page loads
window.addEventListener('load', function() {
console.log("load")
const selectedValue = selectElement.value;
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');