title: Use JQuery each function to return element width
body: <p>I currently have an <code>ul</code> with around 20 <code>li</code>. Each <code>li</code> is structured like this:</p>
  
  <pre><code> &lt;li class="block"&gt;
    &lt;a href="#"&gt;
      &lt;div class="front"&gt;
        &lt;img src="..." /&gt;
      &lt;/div&gt;
      &lt;div class="back"&gt;
       &lt;p&gt;Text&lt;/p&gt;
      &lt;/div&gt;  
    &lt;/a&gt;
  &lt;/li&gt;   
  </code></pre>
  
  <p>I would like to go through each <code>li.block</code>, find its width, and set the anchor tag's width equal to this number.</p>
  
  <p>This is the function I'm using now, but it isn't working:</p>
  
  <pre><code>$(document).ready(function() {
    var $currentWidth = $("li.block").width();
    $( "li.block a" ).css( "width", $currentWidth);
  });
  </code></pre>
  
  <p>What is the proper way to use <code>.each()</code> and something similar to the code above to fix my problem?</p>