title: jQuery resize all images with a certain class to be square
body: <p>My page content is dynamically created, I am trying to write a script that searches for all images in a container 'image-rounded', and if they are not square, change either the height or width to make them square (based on the size of the smallest edge).</p>
  
  <p>Here is my script so far:</p>
  
  <pre><code>jQuery(function($) { 
    $('.wrapper-site').find('.image-rounded img').each(function () { 
      var round_image_width = $(this).width();
      var round_image_height = $(this).height();
  
  if(round_image_height &gt; round_image_width) {
    $(this).css('height', 'round_image_width');
  } else {
    $(this).css('width', 'round_image_height');
  }
  
    });  
  });
  </code></pre>
  
  <p>But currently this does nothing.</p>