<div class="left">
<div class="row">
<div class="column">
<div class="group1">
<img class="myImage" src="images/Image1.png:>
</div>
<img class="myImage" src="images/Image2.png:>
<img class="myImage" src="images/Image3.png:>
<img class="myImage" src="images/Image4.png:>
<img class="myImage" src="images/Image5.png:>
<img class="myImage" src="images/Image6.png:>
//
<div class="ceneter">
<div class="divImage">
<img class="defaultimg" src=""src="images/defailt.png>
I am trying to clone the images to <img class="defaultimg" src=""src="images/defailt.png>
when click on <img class="myImage" src="images/Image3.png:> (this is the repetative images like 6-8 images there)
Issue : its replacing only one image which is in very first.
$( document ).ready(function() {
$(".myImage").on("click",function()){
var sourceimg=$('img[class="myImage"]').attr('src')
$('img[class="defaultimg"]').attr('src',sourceimg);
});