forked from zer.ooo/web
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
387 B
JavaScript
24 lines
387 B
JavaScript
$(function () {
|
|
var clipboard = new Clipboard('.copy');
|
|
|
|
clipboard.on('success', function(e) {
|
|
$(e.trigger).text('copied!');
|
|
setTimeout(
|
|
function () {
|
|
$(e.trigger).text('copy');
|
|
},
|
|
2000
|
|
);
|
|
});
|
|
|
|
clipboard.on('error', function(e) {
|
|
$(e.trigger).text('couldn\t copy :(');
|
|
setTimeout(
|
|
function () {
|
|
$(e.trigger).text('copy');
|
|
},
|
|
2000
|
|
);
|
|
});
|
|
});
|