Skip to content

Commit bf91222

Browse files
committed
Added more details to the readme
1 parent 7f9cf09 commit bf91222

File tree

1 file changed

+33
-4
lines changed

1 file changed

+33
-4
lines changed

README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,52 @@ Grab the latest release from Github or install using bower:
66

77
bower install jquery.tableCheckbox.js
88

9+
## Features
10+
11+
- Translates clicks on rows to their checkbox
12+
- Supports master checkbox in the table header
13+
- Supports selection of multiple rows by holding down the shift key
14+
- No mess with text selections without the need to disable them.
15+
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.
16+
917
## Usage
1018

11-
$('table').tableCheckbox();
19+
<table>
20+
<thead>
21+
<th><input type="checkbox"></th>
22+
<th>Name</th>
23+
</thead>
24+
<tbody>
25+
<tr>
26+
<td><input type="checkbox"></td>
27+
<td>First item</td>
28+
</tr>
29+
<tr>
30+
<td><input type="checkbox"></td>
31+
<td>First item</td>
32+
</tr>
33+
</tbody>
34+
</table>
35+
<script>$('table').tableCheckbox();</script>
36+
37+
You may use this plugin with other markup structures or ways of input.
38+
Use the options below to make it fit your use case.
39+
40+
1241

1342
## Options
1443

15-
$('table').tableCheckbox({ /* options */ })
44+
$('table').tableCheckbox({ /* options */ });
1645

1746
### selectedRowClass
1847

19-
Default: `'warning'` to comply with Bootstrap.
48+
Default: `warning` to comply with Bootstrap.
2049

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

2352
### checkboxSelector
2453

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

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

0 commit comments

Comments
 (0)