阅读背景:

使用jQuery根据另一列的文本汇总列总计

来源:互联网 

I have this code that I use to calculate totals in specific columns based on the text in a different column. It works just fine, but I'm learning, so I would like to know if there is way to consolidate this code. As you can see I run a "each()" twice, once for each column. The first each check for "A" in the first column, then goes to the second column and adds the rows that meet the criteria. Similar on the second column, just that it looks for "B" and add columns 3. Is there a way to run the each function only once and check both column at the same time?I have this code that I use to calculate totals




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: