Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
How to Select From Multiple images to display main product image? [closed]
Closed as unclear by ArtOfCode on Jan 26, 2024 at 16:00
This question cannot be answered in its current form, because critical information is missing.
This question was closed; new answers can no longer be added. Users with the reopen privilege may vote to reopen this question if it has been improved or closed incorrectly.
Below are the links to code for my project.
HTML
CSS
JavaScript
I have created Magnifying Image which was successful now I am trying to add multiple images which can be display in main product image on mouse selecting image I created below code which I commented in the JS file.
window.addEventListener('DOMContentLoaded', () => {
allHoverImages[0].parentElement.classList.add('active')});
allHoverImages.forEach((image) => {
image.addEventListener('mouseover', () => {
product-img.querySelector('img').src = image.src;
});
});
2 comment threads