Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kanety/jquery-simple-select-table


https://github.com/kanety/jquery-simple-select-table

Last synced: 8 days ago
JSON representation

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).