Reputation: 346
I wanted to remove click event on Element in Clipboard.js.
Is there any way to remove click event on button copy icon?
Upvotes: 0
Views: 963
Reputation: 3586
Yes, there is. If you 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.
var clipboard = new Clipboard('.btn');
clipboard.destroy();
Upvotes: 2