Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanety/jquery-simple-select-table
https://github.com/kanety/jquery-simple-select-table
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanety/jquery-simple-select-table
- Owner: kanety
- License: mit
- Created: 2019-06-08T03:55:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-09T05:09:23.000Z (about 5 years ago)
- Last Synced: 2024-12-25T04:04:43.915Z (23 days ago)
- Language: JavaScript
- Size: 31.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery-simple-select-table
A jquery plugin for table with selectable rows and checkboxes.
## Dependencies
* jquery
## Installation
Install from npm:
$ npm install @kanety/jquery-simple-select-table --save
## Usage
Build html as follows:
```html
header
1
2
3
```
Then run:
```javascript
$('table').simpleSelectTable();
```### Options
Selector options:
```javascript
$('table').simpleSelectTable({
headCheckbox: 'th :checkbox',
dataCheckbox: 'td :checkbox',
rowSelector: 'td'
});
```Feature options:
```javascript
$('table').simpleSelectTable({
useShiftClick: true,
useCtrlClick: true,
useUpDownKey: true
});
```### Callbacks
```javascript
$('table').simpleSelectTable({
...
}).on('row:selected', function(e, $row) {
...
}).on('row:unselected', function(e, $row) {
...
});
```## License
The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).