I have this HTML code. I have a slideshow with some images. And I've a linked div for each image that contains a description of that image. Every "div" with class "product" has one CSS property, display: none.
When I click on one image I want to display only the info of that image. Each image is linked to its description by a data-attribute called "data-code". How can do it?
enter code here
<div class="slideshow">
<img data-code="1" >
<img data-code="2" >
<img data-code="3" >
<img data-code="4" >
<div class="productWrapper">
<div class="product" data-code="1">Some info</div>
<div class="product" data-code="2">Some info</div>
<div class="product" data-code="3">Some info</div>
<div class="product" data-code="4">Some info</div>
</div>