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();
});
});
});![Experience the heartbeat of fashion with our Heart Beat Print Streetwear Hoodies. Keep your style on trend with this eye-catching design. Perfect for any casual or athletic occasion, this hoodie will keep you warm and stylish while showcasing your love for streetwear. Get ready to turn heads wherever you go with this must-have piece!](//dragoyle.com/cdn/shop/files/7ce35c69-8879-4cc3-8d43-3b0a5c8c0052.jpg?v=1709057084&width=1445)
![Experience the heartbeat of fashion with our Heart Beat Print Streetwear Hoodies. Keep your style on trend with this eye-catching design. Perfect for any casual or athletic occasion, this hoodie will keep you warm and stylish while showcasing your love for streetwear. Get ready to turn heads wherever you go with this must-have piece!](http://dragoyle.com/cdn/shop/files/c1765777-8a65-4eb9-9f4c-fec9e1f59fcd.jpg?v=1705023188&width=1445)
![Experience the heartbeat of fashion with our Heart Beat Print Streetwear Hoodies. Keep your style on trend with this eye-catching design. Perfect for any casual or athletic occasion, this hoodie will keep you warm and stylish while showcasing your love for streetwear. Get ready to turn heads wherever you go with this must-have piece!](http://dragoyle.com/cdn/shop/files/0648dd7c-626e-4299-aee1-23c080a8a6dd.jpg?v=1709057066&width=1445)
![Experience the heartbeat of fashion with our Heart Beat Print Streetwear Hoodies. Keep your style on trend with this eye-catching design. Perfect for any casual or athletic occasion, this hoodie will keep you warm and stylish while showcasing your love for streetwear. Get ready to turn heads wherever you go with this must-have piece!](http://dragoyle.com/cdn/shop/files/166bdaac-8cd3-498e-be22-05f2a4dd8570.jpg?v=1705023188&width=1445)
![Experience the heartbeat of fashion with our Heart Beat Print Streetwear Hoodies. Keep your style on trend with this eye-catching design. Perfect for any casual or athletic occasion, this hoodie will keep you warm and stylish while showcasing your love for streetwear. Get ready to turn heads wherever you go with this must-have piece!](http://dragoyle.com/cdn/shop/files/39576734-e5b5-4af6-8ab3-0ce1578d98e5.jpg?v=1705023188&width=1445)
![Experience the heartbeat of fashion with our Heart Beat Print Streetwear Hoodies. Keep your style on trend with this eye-catching design. Perfect for any casual or athletic occasion, this hoodie will keep you warm and stylish while showcasing your love for streetwear. Get ready to turn heads wherever you go with this must-have piece!](http://dragoyle.com/cdn/shop/files/0022b86b-2fec-4303-b544-c0f9cd0963d5.jpg?v=1709057072&width=1445)
![Experience the heartbeat of fashion with our Heart Beat Print Streetwear Hoodies. Keep your style on trend with this eye-catching design. Perfect for any casual or athletic occasion, this hoodie will keep you warm and stylish while showcasing your love for streetwear. Get ready to turn heads wherever you go with this must-have piece!](http://dragoyle.com/cdn/shop/files/7ce35c69-8879-4cc3-8d43-3b0a5c8c0052.jpg?v=1709057084&width=1445)