From ebc3ab6ce87f2ade4a3b5d4c9d3eff59ab5a2ca8 Mon Sep 17 00:00:00 2001 From: alexanderroese Date: Wed, 17 Jul 2024 22:03:47 +0200 Subject: [PATCH] select with images --- snippets/shx-3d-render-input.liquid | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/snippets/shx-3d-render-input.liquid b/snippets/shx-3d-render-input.liquid index 2c9dda4..4ca2401 100644 --- a/snippets/shx-3d-render-input.liquid +++ b/snippets/shx-3d-render-input.liquid @@ -598,7 +598,7 @@ console.log("onFontDropdownItemClick") const selectedVariant = event.currentTarget.getAttribute('data-value'); - customSelectedValue.innerText = selectedVariant; + document.getElementById('shx-custom-enhanced-dropdown-font-select-selected-value').innerText = selectedVariant; // Set the selected option in the original select element selectElement.value = selectedVariant; @@ -617,11 +617,11 @@ dropdownContent.style.display = 'none'; - const currentTargetImage = event.currentTarget.querySelector("img") + // const currentTargetImage = event.currentTarget.querySelector("img") - if (currentTargetImage !== null && currentTargetImage.src !== null) { + // if (currentTargetImage !== null && currentTargetImage.src !== null) { //document.getElementById("shx-custom-enhanced-dropdown-variant-selected-image").src = event.currentTarget.querySelector("img").src - } + // } } function SHX_IFC_genDropdownSelect(inputID, labelText, inputName, inputVal, options, section_id) { @@ -641,7 +641,7 @@