A jquery plugin for table with selectable rows and checkboxes
npm install @kanety/jquery-simple-select-tableA jquery plugin for table with selectable rows and checkboxes.
* jquery
Install from npm:
$ npm install @kanety/jquery-simple-select-table --save
Build html as follows:
``html`
header
1
2
3
Then run:
`javascript`
$('table').simpleSelectTable();
Selector options:
`javascript`
$('table').simpleSelectTable({
headCheckbox: 'th :checkbox',
dataCheckbox: 'td :checkbox',
rowSelector: 'td'
});
Feature options:
`javascript`
$('table').simpleSelectTable({
useShiftClick: true,
useCtrlClick: true,
useUpDownKey: true
});
`javascript``
$('table').simpleSelectTable({
...
}).on('row:selected', function(e, $row) {
...
}).on('row:unselected', function(e, $row) {
...
});
The library is available as open source under the terms of the MIT License.