i'm looking for a way to calculate the total width of de level 2 items and put it in the ul. I have looked at some jquery thinks like outerWidth and .lengt but can't figure it out.
thanks in advance
$('#menu li:has(ul) ul').each(function()
<ul>
<li>level 1</li>
<li>
<ul style="widht:??;">
<li>level 2</li>
<li>level 2</li>
</ul>
</li>
<li>level 1</li>
</ul>