Photo exchange?

Hello, can someone tell me how to change the photos when clicking on them? I have a shop page and a details page so that when I click on the shop page on the card, its photos appear on the details page.

you will need to provide more details on your question, it’s quite difficult to know what you are asking

I need to show details of a product and i have a page of shop and details, so when i click on product that is on html i linked to the details
page to show the product details ,so i need to show the picture of that product beacuse when i click on any product it shows the same photo of a product in every product,So to change the photos of product when i click, i hope this is clear now

image src on different files

a bit more clear

it is difficult to know where the issue is without seeing the code tho

can you share a Minimal Reproducible Example? (see at this link How to create a Minimal, Reproducible Example - Help Center - Stack Overflow)

So when they see the product and click on the icon:

<a href="details.html" class="button shop__button">  <i class="bx bx-cart-alt shop__icon"></i> </a>
i need to change photos on the details.html :<div class="product__img">
  <div class="details__img-tag">New</div>
  <img src="new-6.png" alt="" class="prod">
 </div>

Because all product have the same href.details.html so the java script will help me on this but i dont know

are you asking for the code to be written for you? this is not the place for that

No, i dont know why the code is hidden.

I’ve edited your code for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

1 Like

that is not a MRE, I am not able to reproduce your issue with that code

You can learn to do this using JavaScript: https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/

Can I send you a photo of page if you don’t mind for advice what code to use