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 40X60 Telescope Zoom Scope with Compass Tripod Phone Clip is perfect for all of your outdoor adventures. Capturing those amazing photos and videos that you desire to share with your friends and family. Makes great professional looking photos and videos for your online business, social medial sharing and putting on YouTube.](//dragoyle.com/cdn/shop/products/685C39A86B542F5CE42CE1BA6F97D112.jpg?v=1667785024&width=1445)
![This 40X60 Telescope Zoom Scope with Compass Tripod Phone Clip is perfect for all of your outdoor adventures. Capturing those amazing photos and videos that you desire to share with your friends and family. Makes great professional looking photos and videos for your online business, social medial sharing and putting on YouTube.](http://dragoyle.com/cdn/shop/products/50F54907B57FA59B684EE12CC764C131.jpg?v=1667785024&width=1445)
![This 40X60 Telescope Zoom Scope with Compass Tripod Phone Clip is perfect for all of your outdoor adventures. Capturing those amazing photos and videos that you desire to share with your friends and family. Makes great professional looking photos and videos for your online business, social medial sharing and putting on YouTube.](http://dragoyle.com/cdn/shop/products/2E2821DA0D85147145AC061DF5AA70FF.jpg?v=1667785024&width=1445)
![This 40X60 Telescope Zoom Scope with Compass Tripod Phone Clip is perfect for all of your outdoor adventures. Capturing those amazing photos and videos that you desire to share with your friends and family. Makes great professional looking photos and videos for your online business, social medial sharing and putting on YouTube.](http://dragoyle.com/cdn/shop/products/5B2CA914A40446D64F7114CD4E467B4E.jpg?v=1667785024&width=1445)
![This 40X60 Telescope Zoom Scope with Compass Tripod Phone Clip is perfect for all of your outdoor adventures. Capturing those amazing photos and videos that you desire to share with your friends and family. Makes great professional looking photos and videos for your online business, social medial sharing and putting on YouTube.](http://dragoyle.com/cdn/shop/products/55CDD2CE21A097FCCE45C3092A180D41.jpg?v=1667785024&width=1445)
![This 40X60 Telescope Zoom Scope with Compass Tripod Phone Clip is perfect for all of your outdoor adventures. Capturing those amazing photos and videos that you desire to share with your friends and family. Makes great professional looking photos and videos for your online business, social medial sharing and putting on YouTube.](http://dragoyle.com/cdn/shop/products/412601F4DB3BF77DDE5788AB937FD410.jpg?v=1667785024&width=1445)
![This 40X60 Telescope Zoom Scope with Compass Tripod Phone Clip is perfect for all of your outdoor adventures. Capturing those amazing photos and videos that you desire to share with your friends and family. Makes great professional looking photos and videos for your online business, social medial sharing and putting on YouTube.](http://dragoyle.com/cdn/shop/products/685C39A86B542F5CE42CE1BA6F97D112.jpg?v=1667785024&width=1445)