Merge pull request #12 from EaterOfCode/fixCopyButton
fix the copy button so it actually works~master
commit
28a4fcd342
File diff suppressed because one or more lines are too long
@ -0,0 +1,23 @@
|
||||
$(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
|
||||
);
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue