title: jquery setting width to a variable value
body: <p>Could someone explain what's wrong with this snippet?</p>
  
  <p>I'm looking to get the width of all images in a div.</p>
  
  <pre><code>var totalwidth = $("#imagecontainer &gt; img").width();
  $("#imagecontainer").width(totalwidth);
  </code></pre>
  
  <p>sorry, thought it was just a syntax problem
  (un)working example here:<br>
  <a href="http://jsfiddle.net/TZ2nT/3/" rel="nofollow noreferrer">http://jsfiddle.net/TZ2nT/3/</a><br>
  the container div does not accept the value for some reason?</p>