Separate html and js example code

This commit is contained in:
ahocevar
2019-01-07 18:34:43 +01:00
parent c8df836ce1
commit c4c6f84bca
3 changed files with 22 additions and 9 deletions

View File

@@ -1,6 +1,10 @@
(function() {
var clipboard = new Clipboard('#copy-button');
clipboard.on('success', function(e) {
var htmlClipboard = new Clipboard('#copy-html-button');
htmlClipboard.on('success', function(e) {
e.clearSelection();
});
var jsClipboard = new Clipboard('#copy-js-button');
jsClipboard.on('success', function(e) {
e.clearSelection();
});