Hi There,
I have a standard UL as follows:
<ul>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
<li><a href="">Link</a></li>
</ul>
I am trying to find a quick & efficient way to calculate the combined with of all the LI tags. Currently I have:
var width = 0;
$('ul li').each(function() {
width += $(this).outerWidth();
});
I'm just wondering if there is a quicker way to get the same result without using a loop?
Thanks for your help!