Kamal Kumar
Kamal Kumar

Reputation: 346

How to delete Clipboard.js click event

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

Answers (1)

Zeno Rocha
Zeno Rocha

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

Related Questions