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();
});
});
});![This Solar Motion Sensor LED Light can be installed virtually anywhere, its great for a fence, trees, your gutter your house wall, anywhere you can think of this little versatile solar light can go to work for you! Perfect for security situations in an emergency situation. Perfect for a preppers supplies.](//dragoyle.com/cdn/shop/products/E644310BBDAABB25A5D8390AF80EB951.jpg?v=1664850545&width=1445)
![This Solar Motion Sensor LED Light can be installed virtually anywhere, its great for a fence, trees, your gutter your house wall, anywhere you can think of this little versatile solar light can go to work for you! Perfect for security situations in an emergency situation. Perfect for a preppers supplies.](http://dragoyle.com/cdn/shop/products/7ED9B45798E8F9C409B079739ECAEB08.jpg?v=1664850422&width=1445)
![This Solar Motion Sensor LED Light can be installed virtually anywhere, its great for a fence, trees, your gutter your house wall, anywhere you can think of this little versatile solar light can go to work for you! Perfect for security situations in an emergency situation. Perfect for a preppers supplies.](http://dragoyle.com/cdn/shop/products/2E3421C19F515E894E83FE681F11EFA0.jpg?v=1664850459&width=1445)
![This Solar Motion Sensor LED Light can be installed virtually anywhere, its great for a fence, trees, your gutter your house wall, anywhere you can think of this little versatile solar light can go to work for you! Perfect for security situations in an emergency situation. Perfect for a preppers supplies.](http://dragoyle.com/cdn/shop/products/4024DF86006C157579A9B7841D24BDD8.jpg?v=1664850482&width=1445)
![This Solar Motion Sensor LED Light can be installed virtually anywhere, its great for a fence, trees, your gutter your house wall, anywhere you can think of this little versatile solar light can go to work for you! Perfect for security situations in an emergency situation. Perfect for a preppers supplies.](http://dragoyle.com/cdn/shop/products/2F750AF92AEAC8C987CF61FEC7B9F06E.jpg?v=1664850503&width=1445)
![This Solar Motion Sensor LED Light can be installed virtually anywhere, its great for a fence, trees, your gutter your house wall, anywhere you can think of this little versatile solar light can go to work for you! Perfect for security situations in an emergency situation. Perfect for a preppers supplies.](http://dragoyle.com/cdn/shop/products/B12FF4B04BC15171787496677ACEAEC8.jpg?v=1664850524&width=1445)
![This Solar Motion Sensor LED Light can be installed virtually anywhere, its great for a fence, trees, your gutter your house wall, anywhere you can think of this little versatile solar light can go to work for you! Perfect for security situations in an emergency situation. Perfect for a preppers supplies.](http://dragoyle.com/cdn/shop/products/E644310BBDAABB25A5D8390AF80EB951.jpg?v=1664850545&width=1445)