jQuery - set div height equal to div width
<p>I'm trying to make a responsive website that has a grid of squares. So I need the height of each div (with a class of 'main') to be the same as the div width when it resizes. I'm quite new to jQuery so I was hoping somebody could tell me what I'm doing wrong here.</p>

<pre><code>var divWidth = $('.main').width(); 

$(window).resize(function(){
    $('.main').height() = divWidth;
});
</code></pre>

<p>Many thanks!</p>
