From 7a944d3df80afa571c72aaad7e58a5ad59a67e4b Mon Sep 17 00:00:00 2001 From: Jan Umbach Date: Tue, 28 May 2024 17:03:25 +0200 Subject: [PATCH] test --- assets/global.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/assets/global.js b/assets/global.js index 1cc69f2..1a5c6c8 100644 --- a/assets/global.js +++ b/assets/global.js @@ -1129,6 +1129,11 @@ class VariantSelects extends HTMLElement { // how to get second image id from the gallery console.log('mediaGallery', mediaGallery); + // get the second image id + const secondImageId = mediaGallery.querySelector('.product-media-gallery__thumbnail:nth-child(2)').dataset.mediaId; + console.log('secondImageId', secondImageId); + + }