A ver si te sirve esto:
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script> <script type="text/javascript"> $(function(){
var iva,ivatmp,imp;
var totaliva=0;
$("table tbody tr").each(function(index,el){
iva=$(this).children("td:eq(1)").text();
ivatmp=$(this).next().children("td:eq(1)").text();
imp=parseFloat($(this).children("td:eq(2)").text());
totaliva=totaliva+imp;
if(iva!=ivatmp){
$("#iva").append(iva+"% = "+totaliva+"
<br />");
totaliva=0;
}
});
});