What can I do to make this happen. I want that if I click the imgThumb1 image the src of this image is copied on the mainIMG, but the image don’t change when I click it… what should I do?
$(document).ready(function(){
$('.propertyResultImageThumb img[alt="imgThumb1"]').click(function(){
var trial = $('img[alt="imgThumb1"]').attr('src');
$("#mainIMG").attr("src", trial);
});
});
<img alt="mainIMG" src="" id="mainIMG"/>
<img alt="imgThumb1" src="http://..../uploads/2012/09/Villa-Located-In-Almansa.jpg" />
DEMO
my code