I have made a quick Jsbin: http://jsbin.com/ujabew/edit#javascript,html,live
What i\'m trying to achieve is to find out which is the largest
Fleshing out Marc B's comment, using Math.max():
Math.max()
$(document).ready(function(){ var maxWidth = 0; $('.content ul li').each(function(){ var itemWidth = $(this).outerWidth(true); maxWidth = Math.max(maxWidth, itemWidth) }); });