dropdown for product variant picker
parent
6b29318eaa
commit
288eb467c2
|
@ -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');
|
||||
|
|
Loading…
Reference in New Issue