really close to this one, but it seems I'm not looping properly What I have is a table, and I'm trying to sum just the row values individually.
the table row has the id of newPerson, and then the cells have an class of length and the id is the numbers that need to be added. but apparently the code below is summing all the id values where the class="length", not one row at a time. Anybody know how to get this to seperate them so that I get a seperate value for each "newPerson' id? [code] $("tr#newPerson").each( function(){ var start=0; var totalLength = parseInt(start); $(".length").each( function(){ var newLength = parseInt(this.id); totalLength = newLength + totalLength; alert(totalLength); }); }); [/code]