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();
});
});
});
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();
});
});
});![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](//dragoyle.com/cdn/shop/files/9348088622596674620_2048.jpg?v=1685829445&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/4483354057268357032_2048.jpg?v=1685829439&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/5239862512946150722_2048.jpg?v=1685829436&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/9030464960656160537_2048.jpg?v=1685829437&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/6062398948118406390_2048.jpg?v=1685829439&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/14742151232937121898_2048.jpg?v=1685829442&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/5118524686299305018_2048.jpg?v=1685829443&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/7098165393925105965_2048.jpg?v=1685829445&width=1445)
![The pet bandana collar puts a fun spin on standard animal accessories. It is made of polyester duck fabric and is sublimation printable on one side. The bandana collar is available in three sizes to fit any pet.](http://dragoyle.com/cdn/shop/files/9348088622596674620_2048.jpg?v=1685829445&width=1445)