1.0.1 • Published 7 years ago

jquery-tabletotal v1.0.1

Weekly downloads
16
License
MIT
Repository
github
Last release
7 years ago

tableTotal jquery Plugin

Automatically add total row and/or total column to table.

Installation

  1. Include jQuery on the page.
  2. Include jquery.tableTotal.js on the page.

Usage

HTML

<table id="totalMe">
  <thead>
    <tr>
      <th></th>
      <th>Q1</th>
      <th>Q2</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>North</th>
      <td>54</td>
      <td>14<td>
    </tr>
    <tr>
      <th>South</th>
      <td>24</td>
      <td>39</td>
    </tr>
  </tbody>
</table>

JS

$('#totalMe').tableTotal();

Options

totalCol

Default: true

If true, adds a column to your table with row totals.

totalRow

Default: true

If true, adds a row to your table with column totals.

bold

Default: true

If true, makes all total numbers bold.

Live Example

You can find a live example of this plugin in this pen.