« Return to Thread: sum of table rows

Re: sum of table rows

by rolfsf :: Rate this Message:

Reply to Author | View in Thread

That's a nice little plugin Dan! Is it possible to sum a column of text inputs as they're filled (self-totalling, rather than onClick)?

Rolf


Dan G. Switzer, II wrote:
It sounds as if this might be a good candidate for my Calculation plug-in:
http://www.pengoworks.com/workshop/jquery/calculation.plugin.htm

$("tr").each(function (){
        var sum = $("span.length", this).sum();
        var person = $("td.person").text();

        alert(person + " = " + sum);
});

-Dan

 « Return to Thread: sum of table rows