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();
});
});
});![Effortlessly cook delicious meals on-the-go with our Folding Propane Camping Stove with Grill. The convenient folding design makes it easy to transport and the grill feature allows for versatile cooking options. Perfect for camping, backpacking, and outdoor adventures.](//dragoyle.com/cdn/shop/files/S8f78875e5a3645849f0331aa7cc488f9n.webp?v=1736716360&width=1445)
![Effortlessly cook delicious meals on-the-go with our Folding Propane Camping Stove with Grill. The convenient folding design makes it easy to transport and the grill feature allows for versatile cooking options. Perfect for camping, backpacking, and outdoor adventures.](http://dragoyle.com/cdn/shop/files/S3cfbcf944d424ed09c02a2f49221987da_5121f52a-aed8-4c34-bc70-340335d903d7.webp?v=1736716360&width=1445)
![Effortlessly cook delicious meals on-the-go with our Folding Propane Camping Stove with Grill. The convenient folding design makes it easy to transport and the grill feature allows for versatile cooking options. Perfect for camping, backpacking, and outdoor adventures.](http://dragoyle.com/cdn/shop/files/S239cc6f438314accadf7dd98bc183bb7K.webp?v=1736716360&width=1445)
![Effortlessly cook delicious meals on-the-go with our Folding Propane Camping Stove with Grill. The convenient folding design makes it easy to transport and the grill feature allows for versatile cooking options. Perfect for camping, backpacking, and outdoor adventures.](http://dragoyle.com/cdn/shop/files/S815beb1dfcd34740b429dd02e1045937v.webp?v=1736716360&width=1445)
![Effortlessly cook delicious meals on-the-go with our Folding Propane Camping Stove with Grill. The convenient folding design makes it easy to transport and the grill feature allows for versatile cooking options. Perfect for camping, backpacking, and outdoor adventures.](http://dragoyle.com/cdn/shop/files/S4193c2a9c3a94b9093d015873b08b3e2R.webp?v=1736716360&width=1445)
![Effortlessly cook delicious meals on-the-go with our Folding Propane Camping Stove with Grill. The convenient folding design makes it easy to transport and the grill feature allows for versatile cooking options. Perfect for camping, backpacking, and outdoor adventures.](http://dragoyle.com/cdn/shop/files/S1a9431360bef4a18900f184cd55d70a7s.webp?v=1736716360&width=1445)
![Effortlessly cook delicious meals on-the-go with our Folding Propane Camping Stove with Grill. The convenient folding design makes it easy to transport and the grill feature allows for versatile cooking options. Perfect for camping, backpacking, and outdoor adventures.](http://dragoyle.com/cdn/shop/files/S8f78875e5a3645849f0331aa7cc488f9n.webp?v=1736716360&width=1445)