Skip to content

Commit

Permalink
Add example
Browse files Browse the repository at this point in the history
  • Loading branch information
DLarsen committed Mar 28, 2012
1 parent 051cf8b commit 7a7437a
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions README.md
Expand Up @@ -2,3 +2,48 @@ JQuery Sumtr
============

Allows you to summarize table rows with ease.

Given the following markup:

<table id="myTable">
<thead>
<tr>
<th>Name</th>
<th>First</th>
<th>Second</th>
<th>Third</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bob</td>
<td class="sum">1</td>
<td>A</td>
<td class="sum">3</td>
</tr>
<tr>
<td>Henry</td>
<td class="sum">5</td>
<td>B</td>
<td class="sum">9</td>
</tr>
<tr>
<td>Janet</td>
<td class="sum">1</td>
<td>C</td>
<td class="sum">3</td>
</tr>
</tbody>
<tfoot>
<tr class="summary">
<td>Total:</td>
<td></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>

Just apply the plugin as follows

$('#myTable').sumtr();

0 comments on commit 7a7437a

Please sign in to comment.