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 handmade Purple Sand Dragon Backflow Incense Burner is the perfect addition to any room. With its intricate design and durable construction, you'll be enchanted by the mystical smoke that cascades down the figure.](//dragoyle.com/cdn/shop/files/0E90B7BD77FD03074E37C5E3BD8132B1.jpg?v=1698132389&width=1445)
![This handmade Purple Sand Dragon Backflow Incense Burner is the perfect addition to any room. With its intricate design and durable construction, you'll be enchanted by the mystical smoke that cascades down the figure.](http://dragoyle.com/cdn/shop/files/B7080648E78F24D14D95AF68351CE085.jpg?v=1709057050&width=1445)
![This handmade Purple Sand Dragon Backflow Incense Burner is the perfect addition to any room. With its intricate design and durable construction, you'll be enchanted by the mystical smoke that cascades down the figure.](http://dragoyle.com/cdn/shop/files/BA5B3B781D11FA68FD51DA1501FF1FB0.jpg?v=1709057043&width=1445)
![This handmade Purple Sand Dragon Backflow Incense Burner is the perfect addition to any room. With its intricate design and durable construction, you'll be enchanted by the mystical smoke that cascades down the figure.](http://dragoyle.com/cdn/shop/files/B1F2CD78733ACC057946069B273B11BF.jpg?v=1698132382&width=1445)
![This handmade Purple Sand Dragon Backflow Incense Burner is the perfect addition to any room. With its intricate design and durable construction, you'll be enchanted by the mystical smoke that cascades down the figure.](http://dragoyle.com/cdn/shop/files/9C25B1C24E51E72C3C051EC0921231F5.jpg?v=1698132384&width=1445)
![This handmade Purple Sand Dragon Backflow Incense Burner is the perfect addition to any room. With its intricate design and durable construction, you'll be enchanted by the mystical smoke that cascades down the figure.](http://dragoyle.com/cdn/shop/files/F161135FCFB522F82C1502E1ECF00986.jpg?v=1709057046&width=1445)
![This handmade Purple Sand Dragon Backflow Incense Burner is the perfect addition to any room. With its intricate design and durable construction, you'll be enchanted by the mystical smoke that cascades down the figure.](http://dragoyle.com/cdn/shop/files/0E90B7BD77FD03074E37C5E3BD8132B1.jpg?v=1698132389&width=1445)