I have two box price of product and now I want to show image base of box that user selected with javascript, should I change the image src with javascript? here is my code
<div class="offer__prices">
<div class="price__box">
<span class="offer__weight">500 gr</span>
<span class="offer__price">49.99$</span>
</div>
<div class="price__box">
<span class="offer__weight">1 Kg</span>
<span class="offer__price">69.99$</span>
</div>
</div>
<div class="offer__imgSlide">
<img id="offer__img" src="assets/img/offers/1kilo.jpg" alt="">
</div>
Aucun commentaire:
Enregistrer un commentaire