[jQuery] Re: sum of table rows
that AWESOME!! thanks Dan, I had looked at your plugin before, but thought it was overkill for what I was trying to do (I'm fairly new to Javascript and quite new to jquery as well). Thanks for including the bit of code I needed to get your plug-in working for my site. I don't know that I would have gotten it without your help. Pete
[jQuery] Re: sum of table rows
Thanks, updated the entry with a link to that post! Cheers, -Jonathan On 1/23/08, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote: > > > Jonathan, > > >Hey Dan, > > > >Great plugin! http://jqueryminute.com/blog/jquery-calculate-plugin/ > > Thanks! I also blogged a little more information here: > > http://blog.pengoworks.com/index.cfm/2008/1/23/jQuery-Calculation-Plugin-Mak > ing-calculating-easy > > -Dan > >
[jQuery] Re: sum of table rows
Jonathan, >Hey Dan, > >Great plugin! http://jqueryminute.com/blog/jquery-calculate-plugin/ Thanks! I also blogged a little more information here: http://blog.pengoworks.com/index.cfm/2008/1/23/jQuery-Calculation-Plugin-Mak ing-calculating-easy -Dan
[jQuery] Re: sum of table rows
Sweet! Thanks man! Dan G. Switzer, II wrote: > > >>I just realized the description text on the page is completely wrong! It's >>for another plug-in and I used that page as a template for this one. :) > > I just updated the Calculation Plug-in page so that the description is > accurate. I also updated the examples so they work when the numbers are > changed (no need to hit the "Calc" buttons.) > > http://www.pengoworks.com/workshop/jquery/calculation.plugin.htm > > -Dan > > > -- View this message in context: http://www.nabble.com/sum-of-table-rows-tp14879031s27240p15053055.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: sum of table rows
Hey Dan, Great plugin! http://jqueryminute.com/blog/jquery-calculate-plugin/ Cheers, -Jonathan On 1/23/08, Dan G. Switzer, II <[EMAIL PROTECTED]> wrote: > > > >I just realized the description text on the page is completely wrong! > It's > >for another plug-in and I used that page as a template for this one. :) > > I just updated the Calculation Plug-in page so that the description is > accurate. I also updated the examples so they work when the numbers are > changed (no need to hit the "Calc" buttons.) > > http://www.pengoworks.com/workshop/jquery/calculation.plugin.htm > > -Dan > >
[jQuery] Re: sum of table rows
>I just realized the description text on the page is completely wrong! It's >for another plug-in and I used that page as a template for this one. :) I just updated the Calculation Plug-in page so that the description is accurate. I also updated the examples so they work when the numbers are changed (no need to hit the "Calc" buttons.) http://www.pengoworks.com/workshop/jquery/calculation.plugin.htm -Dan
[jQuery] Re: sum of table rows
Rolf, >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)? Sure! You'd just need to trigger sum() event to occur on a keypress event. If you're going to do that, I'd definitely recommend caching the jQuery object you're going to perform the sum() on (that way you're not spending cycles always looking up which elements to sum().) One neat feature is that you can mix and match element types with the mathematical functions. So you can sum a text element against a div element. I just realized the description text on the page is completely wrong! It's for another plug-in and I used that page as a template for this one. :) -Dan > > >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 >> >> > >-- >View this message in context: http://www.nabble.com/sum-of-table-rows- >tp14879031s27240p15050352.html >Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: sum of table rows
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 > > -- View this message in context: http://www.nabble.com/sum-of-table-rows-tp14879031s27240p15050352.html Sent from the jQuery General Discussion mailing list archive at Nabble.com.
[jQuery] Re: sum of table rows
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 >-Original Message- >From: jquery-en@googlegroups.com [mailto:[EMAIL PROTECTED] On >Behalf Of pedalpete >Sent: Tuesday, January 22, 2008 10:13 PM >To: jQuery (English) >Subject: [jQuery] Re: sum of table rows > > >I'm not sure if I am getting closer on this or further away. > >I have a table that looks like this >[code] > > > first person > second person > third person > var $newPerson = $("#newPerson").children( function(){ > var len = $newPerson.each(".shift").id; > alert(len); > }); > }); >[/code] > >
[jQuery] Re: sum of table rows
I'm not sure if I am getting closer on this or further away. I have a table that looks like this [code] first person second person third person