BrandwatchLtd/tabler — pull request #8 by jonathansewell (2013-05-28 10:50:47+00:00)
Title: Refactor togglecolumns plugin to work externally

@spmason please review, low priority from Funky Friday.

I have refactored the toggle columns plugin to allow it to be triggered by an element outside of the table.

Initialising a view that uses ToggleColumns:
```javascript
var toggleColumns = this.toggleColumns = new ToggleColumns();
toggleColumns.customColumns.push({id: 'snippets', name: 'Show snippets'});
```
Opening the ToggleColumns menu in response to a click event:
```javascript
toggleColumns.show({
table: table,
$showtrigger: $(e.target)
});
```