Skip to content

Commit

Permalink
Added more details to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kerwitz committed Jun 4, 2015
1 parent 7f9cf09 commit bf91222
Showing 1 changed file with 33 additions and 4 deletions.
37 changes: 33 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,52 @@ Grab the latest release from Github or install using bower:

bower install jquery.tableCheckbox.js

## Features

- Translates clicks on rows to their checkbox
- Supports master checkbox in the table header
- Supports selection of multiple rows by holding down the shift key
- No mess with text selections without the need to disable them.
The Plugin avoids getting in the way of the user if he wants to select / deselect text and tries to be smart about unwanted selections when selecting rows.

## Usage

$('table').tableCheckbox();
<table>
<thead>
<th><input type="checkbox"></th>
<th>Name</th>
</thead>
<tbody>
<tr>
<td><input type="checkbox"></td>
<td>First item</td>
</tr>
<tr>
<td><input type="checkbox"></td>
<td>First item</td>
</tr>
</tbody>
</table>
<script>$('table').tableCheckbox();</script>

You may use this plugin with other markup structures or ways of input.
Use the options below to make it fit your use case.



## Options

$('table').tableCheckbox({ /* options */ })
$('table').tableCheckbox({ /* options */ });

### selectedRowClass

Default: `'warning'` to comply with Bootstrap.
Default: `warning` to comply with Bootstrap.

This class will be applied to any table row that is selected.

### checkboxSelector

Default: `'td:first-of-type input[type="checkbox"],th:first-of-type input[type="checkbox"]'`
Default: `td:first-of-type input[type="checkbox"],th:first-of-type input[type="checkbox"]`

The jQuery selector used to find the checkboxes in the table.

Expand Down

0 comments on commit bf91222

Please sign in to comment.