title: Run Jquery on window resize
body: <p>I am using j-query to set the height of a div same as width.It is now running on-load, but I want it to run on window resize.</p>
  
  <p>I'm using this : </p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
  $('.source').each(function(){
      var currentWidth = $(this).width();
      $(this).height(currentWidth);
  })
  })
  </code></pre>
  
  <p></p>