untested, but something like this should work
var w = 0; var d = $(#divId); $('img', d).each(function(i) { w += parseInt($(this).attr('width')); }
untested, but something like this should work
var w = 0; var d = $(#divId); $('img', d).each(function(i) { w += parseInt($(this).attr('width')); }