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