Skip to content

Commit 34a8a81

Browse files
committed
More docs
1 parent 1f6f8c8 commit 34a8a81

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

docs/api/1-Options.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,17 @@ exampleTable = document.querySelector('#exampleTable')
3131
Sortable.initTable(exampleTable)
3232
```
3333

34+
#### Events
35+
36+
An `CustomEvent` called `Sortable.sorted` is fired whenever a sort is completed.
37+
38+
Here’s an example of how you might listen to this event:
39+
40+
```coffeescript
41+
exampleTable = document.querySelector('#exampleTable')
42+
exampleTable.addEventListener 'Sortable.sorted', -> console.log '#exampleTable was sorted!'
43+
```
44+
3445
#### Sorting options
3546

3647
##### `data-value`

0 commit comments

Comments
 (0)