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();
});
});
});![Experience the ultimate comfort and relief with our Soft Water Cooling Seat Cushion! The innovative water cooling technology will keep you cool and relaxed, making long drives or work hours a breeze.](//dragoyle.com/cdn/shop/files/97A232E52E608BD5C52A47F55A8713B4.jpg?v=1733110834&width=1445)
![Experience the ultimate comfort and relief with our Soft Water Cooling Seat Cushion! The innovative water cooling technology will keep you cool and relaxed, making long drives or work hours a breeze.](http://dragoyle.com/cdn/shop/files/4209A1D1BC82CF772B7A3D4D378053DC.jpg?v=1733110827&width=1445)
![Experience the ultimate comfort and relief with our Soft Water Cooling Seat Cushion! The innovative water cooling technology will keep you cool and relaxed, making long drives or work hours a breeze.](http://dragoyle.com/cdn/shop/files/206AACA3A29689CB56BEFEAA48C00E1B.jpg?v=1733110829&width=1445)
![Experience the ultimate comfort and relief with our Soft Water Cooling Seat Cushion! The innovative water cooling technology will keep you cool and relaxed, making long drives or work hours a breeze.](http://dragoyle.com/cdn/shop/files/EF03DF31D4A9EFA15B16FAB7DCF51769.jpg?v=1733111443&width=1445)
![Experience the ultimate comfort and relief with our Soft Water Cooling Seat Cushion! The innovative water cooling technology will keep you cool and relaxed, making long drives or work hours a breeze.](http://dragoyle.com/cdn/shop/files/D3FB7EF0B76D995716E44CB511CA9416.jpg?v=1733110832&width=1445)
![Experience the ultimate comfort and relief with our Soft Water Cooling Seat Cushion! The innovative water cooling technology will keep you cool and relaxed, making long drives or work hours a breeze.](http://dragoyle.com/cdn/shop/files/97A232E52E608BD5C52A47F55A8713B4.jpg?v=1733110834&width=1445)