Adds docs for #24

This commit is contained in:
Zeno Rocha 2015-10-03 19:11:29 -07:00
parent e5a6797c82
commit 83a8effff9

View File

@ -131,6 +131,13 @@ new Clipboard('.btn', {
});
```
Also, with are working with single page apps, you may want to manage the lifecycle of the DOM more precisely. Here's how you clean up the events and objects that we create.
```js
var clipboard = new Clipboard('.btn');
clipboard.destroy();
```
## Events
There are cases where you'd like to show some user feedback or capture what has been selected after a copy/cut operation.