document.addEventListener('DOMContentLoaded', function () {
// Get the product images container
var productMedia = document.querySelectorAll('.product-single__media-item');
// Get the variant dropdown or buttons
var variantSelectors = document.querySelectorAll('[name="id"]');
// Function to display the first product image
function showFirstImage() {
if (productMedia.length > 0) {
productMedia.forEach(function (media, index) {
if (index === 0) {
media.style.display = 'block';
} else {
media.style.display = 'none';
}
});
}
}
// Show the first image on page load
showFirstImage();
// Add event listeners to variant selectors
variantSelectors.forEach(function (selector) {
selector.addEventListener('change', function () {
showFirstImage();
});
});
});
document.addEventListener('DOMContentLoaded', function () {
// Get the product images container
var productMedia = document.querySelectorAll('.product-single__media-item');
// Get the variant dropdown or buttons
var variantSelectors = document.querySelectorAll('[name="id"]');
// Function to display the first product image
function showFirstImage() {
if (productMedia.length > 0) {
productMedia.forEach(function (media, index) {
if (index === 0) {
media.style.display = 'block';
} else {
media.style.display = 'none';
}
});
}
}
// Show the first image on page load
showFirstImage();
// Add event listeners to variant selectors
variantSelectors.forEach(function (selector) {
selector.addEventListener('change', function () {
showFirstImage();
});
});
});
document.addEventListener('DOMContentLoaded', function () {
// Get the product images container
var productMedia = document.querySelectorAll('.product-single__media-item');
// Get the variant dropdown or buttons
var variantSelectors = document.querySelectorAll('[name="id"]');
// Function to display the first product image
function showFirstImage() {
if (productMedia.length > 0) {
productMedia.forEach(function (media, index) {
if (index === 0) {
media.style.display = 'block';
} else {
media.style.display = 'none';
}
});
}
}
// Show the first image on page load
showFirstImage();
// Add event listeners to variant selectors
variantSelectors.forEach(function (selector) {
selector.addEventListener('change', function () {
showFirstImage();
});
});
});
document.addEventListener('DOMContentLoaded', function () {
// Get the product images container
var productMedia = document.querySelectorAll('.product-single__media-item');
// Get the variant dropdown or buttons
var variantSelectors = document.querySelectorAll('[name="id"]');
// Function to display the first product image
function showFirstImage() {
if (productMedia.length > 0) {
productMedia.forEach(function (media, index) {
if (index === 0) {
media.style.display = 'block';
} else {
media.style.display = 'none';
}
});
}
}
// Show the first image on page load
showFirstImage();
// Add event listeners to variant selectors
variantSelectors.forEach(function (selector) {
selector.addEventListener('change', function () {
showFirstImage();
});
});
});
document.addEventListener('DOMContentLoaded', function () {
// Get the product images container
var productMedia = document.querySelectorAll('.product-single__media-item');
// Get the variant dropdown or buttons
var variantSelectors = document.querySelectorAll('[name="id"]');
// Function to display the first product image
function showFirstImage() {
if (productMedia.length > 0) {
productMedia.forEach(function (media, index) {
if (index === 0) {
media.style.display = 'block';
} else {
media.style.display = 'none';
}
});
}
}
// Show the first image on page load
showFirstImage();
// Add event listeners to variant selectors
variantSelectors.forEach(function (selector) {
selector.addEventListener('change', function () {
showFirstImage();
});
});
});
document.addEventListener('DOMContentLoaded', function () {
// Get the product images container
var productMedia = document.querySelectorAll('.product-single__media-item');
// Get the variant dropdown or buttons
var variantSelectors = document.querySelectorAll('[name="id"]');
// Function to display the first product image
function showFirstImage() {
if (productMedia.length > 0) {
productMedia.forEach(function (media, index) {
if (index === 0) {
media.style.display = 'block';
} else {
media.style.display = 'none';
}
});
}
}
// Show the first image on page load
showFirstImage();
// Add event listeners to variant selectors
variantSelectors.forEach(function (selector) {
selector.addEventListener('change', function () {
showFirstImage();
});
});
});![46258890146024 Become a leather crafting expert with our Novice Handmade DIY Leather Crafting Kit. This comprehensive kit includes everything you need to create beautiful leather goods, perfect for beginners. With easy-to-follow instructions and high-quality materials, you'll be making professional-level crafts in no time.](//dragoyle.com/cdn/shop/files/O1CN01n4LrWe2Bgb91j9X5i__1046228368.webp?v=1716704052&width=1445)
![46258890178792 Become a leather crafting expert with our Novice Handmade DIY Leather Crafting Kit. This comprehensive kit includes everything you need to create beautiful leather goods, perfect for beginners. With easy-to-follow instructions and high-quality materials, you'll be making professional-level crafts in no time.](http://dragoyle.com/cdn/shop/files/O1CN01PV0HRM2Bgb9u7C4Mc__1046228368.webp?v=1716704054&width=1445)
![Become a leather crafting expert with our Novice Handmade DIY Leather Crafting Kit. This comprehensive kit includes everything you need to create beautiful leather goods, perfect for beginners. With easy-to-follow instructions and high-quality materials, you'll be making professional-level crafts in no time.](http://dragoyle.com/cdn/shop/files/S8b1b901e01444226a653dea3920db913W.jpg?v=1716704052&width=1445)
![Become a leather crafting expert with our Novice Handmade DIY Leather Crafting Kit. This comprehensive kit includes everything you need to create beautiful leather goods, perfect for beginners. With easy-to-follow instructions and high-quality materials, you'll be making professional-level crafts in no time.](http://dragoyle.com/cdn/shop/files/O1CN01LQTSn42Bgb9r2yYIH__0-item_pic.webp?v=1716704454&width=1445)
![46258890080488 Become a leather crafting expert with our Novice Handmade DIY Leather Crafting Kit. This comprehensive kit includes everything you need to create beautiful leather goods, perfect for beginners. With easy-to-follow instructions and high-quality materials, you'll be making professional-level crafts in no time.](http://dragoyle.com/cdn/shop/files/O1CN01vLKBj42Bgb9pkgzvR__1046228368.webp?v=1716704053&width=1445)
![46258890113256 Become a leather crafting expert with our Novice Handmade DIY Leather Crafting Kit. This comprehensive kit includes everything you need to create beautiful leather goods, perfect for beginners. With easy-to-follow instructions and high-quality materials, you'll be making professional-level crafts in no time.](http://dragoyle.com/cdn/shop/files/O1CN01Q36AOo2Bgb9nmLTtO__1046228368.webp?v=1716704055&width=1445)
![46258890146024 Become a leather crafting expert with our Novice Handmade DIY Leather Crafting Kit. This comprehensive kit includes everything you need to create beautiful leather goods, perfect for beginners. With easy-to-follow instructions and high-quality materials, you'll be making professional-level crafts in no time.](http://dragoyle.com/cdn/shop/files/O1CN01n4LrWe2Bgb91j9X5i__1046228368.webp?v=1716704052&width=1445)