title: Change image on click by another thumbnail
body: <p>I need to change image on click to another image.</p>
  
  <p>In my example on <a href="https://jsfiddle.net/Frunky/7kp3xbur/1/" rel="nofollow noreferrer">jsfiddle</a> it works</p>
  
  <p>But on my Wordpress site, it doesn't work and I don't know why. Click event doesn't work, but if I add alert('1')(for example) it works only one time.</p>
  
  <pre><code>jQuery('.thumbnails img').click(function() {
      var attr = jQuery(this).attr('src');
      var src = jQuery('.main-image img').attr('src');
      jQuery('.main-image img').attr('src', attr);
      jQuery(this).attr('src', src);
  });
  
  &lt;div class="images"&gt;
    &lt;div class="main-image"&gt;
      &lt;img src="https://www.w3schools.com/css/img_fjords.jpg"&gt;
    &lt;/div&gt;
    &lt;div class="thumbnails columns-3" style="display: block;"&gt;
      &lt;img width="184" height="123" src="https://s3-us-west-1.amazonaws.com/powr/defaults/image-slider2.jpg" class="attachment-shop_thumbnail size-shop_thumbnail"&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Where's my mistake?</p>
  
  <p>Thanks</p>