I have an .each() function that measures the width of each of the images within the class of .item. I need all the widths to be measured and then added to a variable. The variable then needs to be passed out of the function. This function below is only half done, I just dont know how to finish it off.
Any help much appreciated.
$('.item img').each(function () {
var i = $(this).width();
});
$('.overview').css('width', i);