From e37450eaabae69ac4bbd33058ccfbb4ed9cf9fe8 Mon Sep 17 00:00:00 2001 From: Jan Umbach Date: Mon, 27 May 2024 21:54:02 +0200 Subject: [PATCH] test --- assets/global.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/assets/global.js b/assets/global.js index 0267a71..55a3da8 100644 --- a/assets/global.js +++ b/assets/global.js @@ -1047,6 +1047,15 @@ class VariantSelects extends HTMLElement { } } ); + document.querySelectorAll('[thumbnail-alt-mobile]').forEach((thumbnail) => { + console.log(thumbnail.getAttribute('thumbnail-alt-mobile')); + if (thumbnail.getAttribute('thumbnail-alt-mobile') === this.currentVariant.featured_image.alt) { + thumbnail.style.display = 'block'; + } else { + thumbnail.style.display = 'none'; + } + } + ); } else { // show all thumbnails